Question

I am developing a project to monitor solar voltage and battery voltage by displaying them on an LCD. I programmed an Atmega8 with an arduino. When I attached the LCD with the board it worked pretty well. So I detached it from board and made a breadboard circuit as described on this page.

It didn't work this time. I checked all the connections many times but could not get to any point. Kindly guide me how to make a standalone atmega8 circuit to display something on an LCD.

Était-ce utile?

La solution

Start slowly. There are some pitfalls when migrating to your own design (and yes, there's another forum for that). If you're using an external crystal oscillator, make sure that you've programmed the Atmel chip to use it by programming the appropriate fuse bits. After that, look to see if you can toggle a single output of the device. Ideally with a single LED connected, so you can see if the output port is changing state.

Some LCD controllers can require relatively precise timings, so if you have a logic analyser you can examine the waveforms. Otherwise, check your clock timing by turning on and off an LED every ten seconds (or so) and use a stopwatch to count ten or twenty of the LED flashes. You can see what your clock speed is working out to be, and verify that it's the right clock, etc.

Autres conseils

You need to program the fuses correectly for standalone operation when no crystal is attached (Arduino has an external crystal) Hence, for running an Atmel using the internal clock, the clock fuse needs to be programmed correctly. In the datasheet you will find the description.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top