Hi all,
In this project I used PCB I made, see attached schematics.
I used the instructions in this page to program the fuses, with the following cmd line:
avrdude -c usbtiny -p m328p -B 25 -U lfuse:w:0xFF:m -U hfuse:w:0xDE:m -U efuse:w:0x05:m
which I undestand is prity standard to arduio boards.
I use a 16Mhz ceramic resonator.
I can program the board using a USBtinyISP using arduino IDE (as a nano board or as a duemilanove) and I uploaded a bootloader and I can program the device using an FTDI cable.
The problem - The board works OK for a few seconds, and than starts behaving erratically. I wrote a simple "hello world" program with delays. It starts fine and than it starts printing with no delays and other strange things. I have noticed that if I use sevral Serial.begin(9600); at the setup section, It works a little better.
Power supply... if that’s all you have connected, almost any correctly rated supply will do. The processor and LED use very little power.
IMPORTANT: do you have decoupling /bypass caps on Vcc close to the chips?
Code... if that sketch fails, you have Something else quite wrong.
input states... your code doesn’t do anything Yet.
In typical code if you are testing input pins, but those pins are not connected/indeterminate - the readings can appear random.
endrew:
Hi all,
In this project I used PCB I made, see attached schematics.
I used the instructions in this page to program the fuses, with the following cmd line:
avrdude -c usbtiny -p m328p -B 25 -U lfuse:w:0xFF:m -U hfuse:w:0xDE:m -U efuse:w:0x05:m
which I undestand is prity standard to arduio boards.
I use a 16Mhz ceramic resonator.
Try changing the low fuse from 0xFF to 0xF7. This sets the clock oscillator to full swing mode. Also, do you have the required bypass caps installed and as close as possible to the 328?
lastchancename:
IMPORTANT: do you have decoupling /bypass caps on Vcc close to the chips?
I want to kiss you! that was it. I didn't solder the capacitor, I figured the capacitors from the programmer would suffice... Soldered the capcitor, everything works great.
Illustrates the point that while making your own board is an entertaining exercise, just using a ready-made and fully proven Pro Mini as a module is simpler, cheaper, and a more reliable approach!