currently I want to get an ATMega328P and an ATTiny85 to work on a breadboard, which should talk to each other and an LCD via TWI.

Anyway, I came across some issues I don't seem to be able to fix at all.
Without an ISP attached the ATTiny doesn't do a thing(programmed it to flash a light for now), connecting the ISP makes it work just fine. Similiar thing with the ATMega, when the ISP is disconnected I can't get correct data over USART. Either it stops transmitting entirely or some garbage is transmitted.

When I started I had a really barebones breadboard wired up, but as suggested in other forums and on here, I added a couple components in the hope to fix it finally.

Here's what it looks like right now:


Inititally I had a 4.7k as a pull-up on the reset pins, but it was suggested that 10k was better(with AVR circuit design considerations as source). Als the caps for the VCC/GND were added later on to reduce the affects of noise in the power delivery. The caps on the crystal were calculated with the spec sheet of it and a formula found in the ATMega spec sheet.

But nothing really helped. Even when I remove the ATTiny and have the ATMega on it's own, it won't really work.

Also it seems that the voltage on the reset pin is just 20mV. What could be the reason for that?

As a power supply I'm using a board called "ywRobot Power Board" plugged to a adjustable power plug which outputs 12V and can deliver 300mA max. The crystal is a 20MHz HC-49.

Fuse Bits on the ATMega328P: 0xFF/0xD9/0xEF(Ext/High/Low)(factory default, except clock-source and CKDIV8)

Fuse Bits on the ATTiny85P: 0xFF/0xDF/0x62(Ext/High/Low)(factory default)

  • \$\begingroup\$ Wong fuse settings? False connection? Bad crystal? Wrong programming? No power? ..... \$\endgroup\$ – dannyf Mar 21 '17 at 22:36
  • \$\begingroup\$ also happens when using the internal oscilator. I don't really know what to check with the fuse bits. The ATTiny has the factory defaults and the ATMega also has factory defaults except for the clock source and clock divider bit. For the clock-source I have "Ext. Crystal Osc.; Frequency 8.0- MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 4.1 ms; [CKSEL=1111 SUT=10]" selected. \$\endgroup\$ – rfreytag Mar 21 '17 at 22:44
  • \$\begingroup\$ On the ATTiny the code is just the simple LED blinking, so DDRB4 set and fliping PB4 ever second. The USART code on the ATMega is pretty much just the code from the datasheet with 9600 Baud-rate and two stop-bits. Checked the wiring again, looks like nothing is wrong there. \$\endgroup\$ – rfreytag Mar 21 '17 at 23:14
  • \$\begingroup\$ 0xEF fuse for ATmega is selecting low power oscillator with frequency range up to 16 MHz if I read CKSEL description in datasheet correctly. I am not sure if it could cause your problems (20 mV on reset pin is really strange regardless clock or anything), but it is not good idea anyway. Use 0xE7 instead (Full Swing Crystal Oscillator). \$\endgroup\$ – Martin Mar 21 '17 at 23:26
  • 1
    \$\begingroup\$ Did you discover why 5V wasn't there before installing the dedicated pull-up? You should determine the cause of any anomaly. Even if it doesn't seem important, It might give you a clue as to what else is wrong. \$\endgroup\$ – Bruce Abbott Mar 22 '17 at 0:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.