0

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.

Saqib Ahmed
  • 1,056
  • 14
  • 33
  • 2
    This question appears to be off-topic because it is about electronics and should be posted on [SE Electronics](http://electronics.stackexchange.com/) – Moog Aug 25 '13 at 10:55
  • Actually the question is 60 percent related to programming and 40 percent to electronics. However the actual problem is somewhat more electronics related. Therefore the question made its way to this site. – Saqib Ahmed Aug 25 '13 at 17:32
  • Are you sure it's programmed correctly? Try uploading a blink sketch to see if that works. We need to isolate if the problem is in the circuitry or if the code hasn't been flashed properly. – user2461391 Aug 26 '13 at 16:09
  • @SaqibAhmed if it worked when connected via the arduino then it's unlikely to be a programming error ... re-check your breadboard circuit. It's not really a suitable [SO] question unless you post the code and have a specific error. Linking to some random wordpress site isn't good enough as links can break. – Moog Aug 26 '13 at 18:49

2 Answers2

1

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.

dtynan
  • 78
  • 8
0

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.

ogni42
  • 1,232
  • 7
  • 11