NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Support Forum » help. please...

September 16, 2009
by Jesuz
Jesuz's Avatar

I have the first circuit built. It lets me program the chip, but whenever I take it out of programming mode the lcd comes on but then instantly dims down. It almost seems as if it is just getting drained of power. No camera, sorry. please help.

September 17, 2009
by rusirius
rusirius's Avatar

I'd double check a couple of things... First the simple ones... Double check and make sure the wiring on the LCD is correct, and also make sure the resistor for the contrast of the LCD is the right one, and it's in place correctly...

Do you see two "solid" lines across the LCD while it's in programming mode?

Do you have a multimeter? Check the power output of the regulator while everything is turned on... If it's low, is your battery bad?

September 17, 2009
by Jesuz
Jesuz's Avatar

all that checked out, I did some trouble shooting. Think it might be the oscilator. Does that make sense? When I take it out, the screen dosent dim down.. It has the two solid lines.

September 17, 2009
by rusirius
rusirius's Avatar

Hrmmm... perhaps the crystal isn't able to start oscillating? Try this...

In the kit I think you'll find two 22pF caps...

Try placing one of these on each side of the crystal... In other words, if I remember correctly the crystal sits between pin 9 and pin 10 on the ATMega168... You'll want one of the caps connected to pin 9 and the other "side" of it connected to ground... Then take the other cap and connect it to pin 10 on the MCU with it's other side connected to ground too...

That will help the oscillator get "started" easier... It might just need a little "kick" ... ;)

September 18, 2009
by Jesuz
Jesuz's Avatar

i will try that again tonight. I am using the evil mad scientist dev board. If I put the two caps in. can I take an 8 or 16mhz out of something else and just change the top line in the .c file and the makkefile

September 18, 2009
by rusirius
rusirius's Avatar

I'm not sure about that particular board, but that all depends... Remember that the crystal is used to clock everything, INCLUDING the serial link... If you're using the nerdkits bootloader and programming through the serial connection, then you won't be able to swap the crystal since serial clock rates would change with the crystal and would need to be recoded to get the proper baud rate.

On the other hand, if you're using a different board I'm going to assume it's probably and SPI programmer? In that case, you should be fine swapping it to whatever...

I haven't looked through the header files enough to know if the F_CPU definition is actually used anywhere in them... My guess is it's not, in which case you really don't need it at all... It's just an easy way to reference the clock cycles if need be (i.e. calculating the above mentioned clock rates for the serial port baud rate).

September 19, 2009
by mrobbins
(NerdKits Staff)

mrobbins's Avatar

Rusirius is right -- the crystal value (14.7456 MHz) is used to set the baud rate of the serial link (115200 baud = 14745600 / 128), so using a different baud rate will change the serial baud rate. Some other NerdKits users have had success pushing their chip to 25MHz and using a correspondingly higher baud rate (see this thread), but others reported difficulty setting their serial port to non-standard baud rates.

If it is able to program successfully, then I would not suspect the oscillator, because the bootloader uses this as well.

Jesuz, you say it isn't working on this other board, but were you able to successfully follow along with The NerdKits Guide using the solderless breadboard and get everything working that way?

Mike

September 22, 2009
by Jesuz
Jesuz's Avatar

Yes, I got it working on the breadboard. Im assuming the problem isnt in the oscillator considering I can get it to program the chip. It is just really odd. Im pretty sure nothing is bridged. I have looked at it for a few days now and cant find anything out of place.. If you have any idea's throw them at me.. Im going to tinker with it tonight and see what I can figure out.. If i do figure it out, ill post the answer incase someone else has the same problem.

September 23, 2009
by rusirius
rusirius's Avatar

Going back over and reading your post I have to ask one thing... Are you positive you're outputting to the LCD correctly? I guess what I mean is, those solid "Bars" you see would be when the LCD isn't initialized at all... (that's why you see them in programming mode)... If you switch off programming mode and start up, you'll see the screen sorta "flash" when it initializes, but then it will go "blank" unless there is data to display... I'm wondering if it's possible that's what is happening here?

Can you take some pictures of your setup and/or post up the code you're programming it with? That might help diagnose things a bit...

September 24, 2009
by Jesuz
Jesuz's Avatar

Thanks for all the help.. Im not sure what the problem was, but I took it apart and put it back together and it works :)

Post a Reply

Please log in to post a reply.

Did you know that hobby servos are controlled through a particular kind of PWM (Pulse Width Modulation) signal? Learn more...