#7 Doesn't work for some unidentified reason

Talk about the fifth PyroEDU course here.
menix
Newbie Pyro
Posts: 4
Joined: Sat Apr 11, 2015 11:46 pm

#7 Doesn't work for some unidentified reason

Postby menix » Sun Apr 12, 2015 12:07 am

Hi,

I've written good VHDL code and edited pins in Pin Planner as you have, and i've also placed all wires and parts on the breadboard (I've doubled checked) and everything went smoothly until i programmed the chip on the board. Nothing happens: counter doesn't work, button and led also... This is the result:
Image
img url: http://cl.ly/image/3l0W2E123C0o

If you could please solve this mystery for me, i would really appreciate it.

Thank you

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Re: #7 Doesn't work for some unidentified reason

Postby ThePyroElectro » Sun Apr 12, 2015 5:25 pm

menix wrote:Hi,

I've written good VHDL code and edited pins in Pin Planner as you have, and i've also placed all wires and parts on the breadboard (I've doubled checked) and everything went smoothly until i programmed the chip on the board. Nothing happens: counter doesn't work, button and led also... This is the result:
Image
img url: http://cl.ly/image/3l0W2E123C0o

If you could please solve this mystery for me, i would really appreciate it.

Thank you


Hi Menix,

At first glance, here are two issues I saw with the hardware wiring:

[1]
The 5mm Red LED is connected directly to the CPLD output. You want the LED to connect to the CPLD I/O pin through the 470Ω resistor to limit how much current the CPLD must output. The blue arrow below points to the hole where you should be connecting the LED's anode pin (the longer one).

Image

[2]
Your control line wiring is different than mine (red circle below). You have wired pins 3 & 4 to ground, they should be connected to power. These two pins are meant to test the CD4511 IC, they are the Lamp Test and Blanking pins. One lights up the entire display, the other turns the entire display off. For more about them here's the CD4511 datasheet: http://www.ti.com/lit/ds/symlink/cd4511b.pdf

Image

I'm not sure if this will fix all of the problems. But it's what I noticed first. When debugging a circuit, Typically first I check power, in your case it looks like power is flowing. Second I would check the clock signal from the 7555 timer. You can do this by adding an LED to Pin3 of the 7555 (the output pin). If the LED toggles on and off, you know the clock is working. After that I would move directly to evaluate the CPLD outputs and make sure they are toggling and then finally to the peripheral devices like the push button and/or CD4511 7 segment LED circuit to see if the issue is there.

Good luck!

menix
Newbie Pyro
Posts: 4
Joined: Sat Apr 11, 2015 11:46 pm

Re: #7 Doesn't work for some unidentified reason

Postby menix » Sun Apr 12, 2015 8:46 pm

Hey PyroElectro

First of all i would like to thank you for your quick and detailed response.
I appreciate it very much.

You were right from the beginning. The problem (at least part of it) was in hardware wiring. I’ve fixed those two issues that you pointed out but unfortunately that was not the end of my problems— turns out that my clock isn’t working. I checked the 755 timer with the LED on Pin3 and nothing happened. By the way when i connect the battery, LED display displays 0 and button and LED work fine. It just doesn't count.

Unfortunately another conundrum appeared:

When i connect the battery, LED display goes crazy if i touch the wires or Pin37 on the CPLD. Sometimes if i keep pressing the push button very fast, the LED display starts displaying random numbers and the red LED goes dim and it stays that way (instead of going completely off). Do you know the answer to this unusual behaviour?

Image
gif url: http://cl.ly/image/3p0x410x1X2S/o

P.S. Could you explain to me in a few words the role of RESET (resistor) connected on Pin44?

Kind Regards,
Milos

ThePyroElectro
PyroElectro Admin
Posts: 1181
Joined: Mon Nov 12, 2007 9:24 pm
Location: Earth
Contact:

Re: #7 Doesn't work for some unidentified reason

Postby ThePyroElectro » Mon Apr 13, 2015 4:37 pm

menix wrote:Hey PyroElectro

First of all i would like to thank you for your quick and detailed response.
I appreciate it very much.

You were right from the beginning. The problem (at least part of it) was in hardware wiring. I’ve fixed those two issues that you pointed out but unfortunately that was not the end of my problems— turns out that my clock isn’t working. I checked the 755 timer with the LED on Pin3 and nothing happened. By the way when i connect the battery, LED display displays 0 and button and LED work fine. It just doesn't count.

Unfortunately another conundrum appeared:

When i connect the battery, LED display goes crazy if i touch the wires or Pin37 on the CPLD. Sometimes if i keep pressing the push button very fast, the LED display starts displaying random numbers and the red LED goes dim and it stays that way (instead of going completely off). Do you know the answer to this unusual behaviour?

Image
gif url: http://cl.ly/image/3p0x410x1X2S/o

P.S. Could you explain to me in a few words the role of RESET (resistor) connected on Pin44?

Kind Regards,
Milos


Hi Milos,

The cause for the behavior you're seeing is probably caused by the fact that your clock hardware isn't working. If you connected a 10kΩ resistor from Pin 37 to ground, the erratic behavior you're seeing would likely go away because you'd be giving excess voltage/current floating at Pin37 a place to go. As it is right now, Pin37 is connected to a circuit that doesn't work, and so voltage is probably accumulating at the pin and when you touch it, it's triggering the CPLD's input on/off very fast since the current flow doesn't have a solid path to flow in any direction. The additional 10kΩ resistor from Pin37 to ground will not affect the clock circuit, it's just a way to make sure that Pin37 stays at +0v when the clock is inactive. The bigger thing is your clock circuit. Try to rebuild it either from the video's time-lapse or the schematic and get a nice clock signal to put the CPLD to work!

All digital electronics start up in an unknown state. If you took the digital course, you'll remember flip-flops and logic gates don't have known outputs at power-up. Even though we aren't using it, it's good form to include a simple reset circuit in your code so that all the logic can be set back to a known initial state. For example: if you take a wire and plug it into your +3.3v power and then just touch Pin 44 with the other side....you'll see your system reset back to the initial state seen in the code.

WilliamDar
Newbie Pyro
Posts: 1
Joined: Wed Nov 18, 2015 6:39 pm

#7 Doesnt work for some unidentified reason

Postby WilliamDar » Fri Mar 11, 2016 3:27 pm

The reason 4 my errors was the square brackets...
but they seem to be correct in your code..
Itz working fine..
try again


Return to “Introduction to CPLD and FPGA”

Who is online

Users browsing this forum: No registered users and 2 guests