Bare programming an ATmega328p - it's bricked

H iall

Dug out a small PCB I had that takes a 328p processor. Soldered it on with a 16Mhz crystal, 2x 22pf caps to ground as usual and a led + resistor off one pin so I can test the blink routine.

Its programmed with a USBASP, which is wired with SCK, MISO AND MOSI. It usually works fine.

Uploaded blink using an Arduino Pro Mini selected, 16Mz 5v and it uploaded fine.
It then proceeded to flash the led about once every 5 seconds.... so it needs the bootloader uploading as it must be a new IC.

Pressed burn bootloader and it failed

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 1 
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

Error while burning bootloader.

Error while burning bootloader.

Now it does zip. No led flashing and literally nothing seems to get me back in. Bricked?

Not sure what i can try next. Not exactly sure why the bootloader option failed (yet messed it up). It must have changed a fuse or something, otherwise why doesn't the loaded blink routine now work (albeit at the wrong freq)

Ideas?

P.S. I am sure I had the option to select a bare 328p IC in my boards manager but I now cannot find that option. Is there a boards manager for bare ICs?

I use the MiniCore core - Google Search. Best that i have seen.

Installation instructions on the GitHub page.

What is the exact marking on the chip?

Yea. I just found the Minicore, but it is just throwing up constantly that it can't find the programmer.

I am just going to try a known working board with the USBASP.

I will look for the markings

Oh yea... that's why I avoid Arduinos.....

So my known PCB that works fine now doesn't compile and has a bible sized pile of errors.
No idea what has changed since this was used a few months back..

In file included from C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial.cpp:68:0:
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h: In function 'void _DMX_init()':
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:119:16: error: 'UCSR1A' was not declared in this scope
 #define UCSRnA UCSR1A
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:159:3: note: in expansion of macro 'UCSRnA'
   UCSRnA = 0;
   ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:119:16: note: suggested alternative: 'UCSR0A'
 #define UCSRnA UCSR1A
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:159:3: note: in expansion of macro 'UCSRnA'
   UCSRnA = 0;
   ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h: In function 'void _DMX_setMode(DMXUARTMode)':
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:122:16: error: 'UCSR1B' was not declared in this scope
 #define UCSRnB UCSR1B
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:167:5: note: in expansion of macro 'UCSRnB'
     UCSRnB = 0;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:122:16: note: suggested alternative: 'UCSR0B'
 #define UCSRnB UCSR1B
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:167:5: note: in expansion of macro 'UCSRnB'
     UCSRnB = 0;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:132:16: error: 'UBRR1H' was not declared in this scope
 #define UBRRnH UBRR1H
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:171:5: note: in expansion of macro 'UBRRnH'
     UBRRnH = _DMX_dmxPreScale >> 8;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:132:16: note: suggested alternative: 'UBRRnH'
 #define UBRRnH UBRR1H
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:171:5: note: in expansion of macro 'UBRRnH'
     UBRRnH = _DMX_dmxPreScale >> 8;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:133:16: error: 'UBRR1L' was not declared in this scope
 #define UBRRnL UBRR1L
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:172:5: note: in expansion of macro 'UBRRnL'
     UBRRnL = _DMX_dmxPreScale;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:133:16: note: suggested alternative: 'UBRRnL'
 #define UBRRnL UBRR1L
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:172:5: note: in expansion of macro 'UBRRnL'
     UBRRnL = _DMX_dmxPreScale;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:122:16: error: 'UCSR1B' was not declared in this scope
 #define UCSRnB UCSR1B
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:174:5: note: in expansion of macro 'UCSRnB'
     UCSRnB = (1 << RXENn);
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:122:16: note: suggested alternative: 'UCSR0B'
 #define UCSRnB UCSR1B
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:174:5: note: in expansion of macro 'UCSRnB'
     UCSRnB = (1 << RXENn);
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:126:15: error: 'RXEN1' was not declared in this scope
 #define RXENn RXEN1
               ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:174:20: note: in expansion of macro 'RXENn'
     UCSRnB = (1 << RXENn);
                    ^~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:126:15: note: suggested alternative: 'RXEN0'
 #define RXENn RXEN1
               ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:174:20: note: in expansion of macro 'RXENn'
     UCSRnB = (1 << RXENn);
                    ^~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:128:16: error: 'UCSR1C' was not declared in this scope
 #define UCSRnC UCSR1C
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:176:5: note: in expansion of macro 'UCSRnC'
     UCSRnC = DMXREADFORMAT; // accept data packets after first stop bit
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:128:16: note: suggested alternative: 'UCSRnC'
 #define UCSRnC UCSR1C
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:176:5: note: in expansion of macro 'UCSRnC'
     UCSRnC = DMXREADFORMAT; // accept data packets after first stop bit
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:132:16: error: 'UBRR1H' was not declared in this scope
 #define UBRRnH UBRR1H
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:179:5: note: in expansion of macro 'UBRRnH'
     UBRRnH = _DMX_dmxPreScale >> 8;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:132:16: note: suggested alternative: 'UBRRnH'
 #define UBRRnH UBRR1H
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:179:5: note: in expansion of macro 'UBRRnH'
     UBRRnH = _DMX_dmxPreScale >> 8;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:133:16: error: 'UBRR1L' was not declared in this scope
 #define UBRRnL UBRR1L
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:180:5: note: in expansion of macro 'UBRRnL'
     UBRRnL = _DMX_dmxPreScale;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:133:16: note: suggested alternative: 'UBRRnL'
 #define UBRRnL UBRR1L
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:180:5: note: in expansion of macro 'UBRRnL'
     UBRRnL = _DMX_dmxPreScale;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:122:16: error: 'UCSR1B' was not declared in this scope
 #define UCSRnB UCSR1B
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:181:5: note: in expansion of macro 'UCSRnB'
     UCSRnB = (1 << RXENn) | (1 << RXCIEn);
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:122:16: note: suggested alternative: 'UCSR0B'
 #define UCSRnB UCSR1B
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:181:5: note: in expansion of macro 'UCSRnB'
     UCSRnB = (1 << RXENn) | (1 << RXCIEn);
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:126:15: error: 'RXEN1' was not declared in this scope
 #define RXENn RXEN1
               ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:181:20: note: in expansion of macro 'RXENn'
     UCSRnB = (1 << RXENn) | (1 << RXCIEn);
                    ^~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:126:15: note: suggested alternative: 'RXEN0'
 #define RXENn RXEN1
               ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:181:20: note: in expansion of macro 'RXENn'
     UCSRnB = (1 << RXENn) | (1 << RXCIEn);
                    ^~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:123:16: error: 'RXCIE1' was not declared in this scope
 #define RXCIEn RXCIE1
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:181:35: note: in expansion of macro 'RXCIEn'
     UCSRnB = (1 << RXENn) | (1 << RXCIEn);
                                   ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:123:16: note: suggested alternative: 'RXCIEn'
 #define RXCIEn RXCIE1
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:181:35: note: in expansion of macro 'RXCIEn'
     UCSRnB = (1 << RXENn) | (1 << RXCIEn);
                                   ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:128:16: error: 'UCSR1C' was not declared in this scope
 #define UCSRnC UCSR1C
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:182:5: note: in expansion of macro 'UCSRnC'
     UCSRnC = DMXREADFORMAT; // accept data packets after first stop bit
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:128:16: note: suggested alternative: 'UCSRnC'
 #define UCSRnC UCSR1C
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:182:5: note: in expansion of macro 'UCSRnC'
     UCSRnC = DMXREADFORMAT; // accept data packets after first stop bit
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:132:16: error: 'UBRR1H' was not declared in this scope
 #define UBRRnH UBRR1H
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:185:5: note: in expansion of macro 'UBRRnH'
     UBRRnH = _DMX_breakPreScale >> 8;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:132:16: note: suggested alternative: 'UBRRnH'
 #define UBRRnH UBRR1H
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:185:5: note: in expansion of macro 'UBRRnH'
     UBRRnH = _DMX_breakPreScale >> 8;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:133:16: error: 'UBRR1L' was not declared in this scope
 #define UBRRnL UBRR1L
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:186:5: note: in expansion of macro 'UBRRnL'
     UBRRnL = _DMX_breakPreScale;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:133:16: note: suggested alternative: 'UBRRnL'
 #define UBRRnL UBRR1L
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:186:5: note: in expansion of macro 'UBRRnL'
     UBRRnL = _DMX_breakPreScale;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:122:16: error: 'UCSR1B' was not declared in this scope
 #define UCSRnB UCSR1B
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:187:5: note: in expansion of macro 'UCSRnB'
     UCSRnB = ((1 << TXENn) | (1 << TXCIEn));
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:122:16: note: suggested alternative: 'UCSR0B'
 #define UCSRnB UCSR1B
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:187:5: note: in expansion of macro 'UCSRnB'
     UCSRnB = ((1 << TXENn) | (1 << TXCIEn));
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:127:15: error: 'TXEN1' was not declared in this scope
 #define TXENn TXEN1
               ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:187:21: note: in expansion of macro 'TXENn'
     UCSRnB = ((1 << TXENn) | (1 << TXCIEn));
                     ^~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:127:15: note: suggested alternative: 'TXEN0'
 #define TXENn TXEN1
               ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:187:21: note: in expansion of macro 'TXENn'
     UCSRnB = ((1 << TXENn) | (1 << TXCIEn));
                     ^~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:124:16: error: 'TXCIE1' was not declared in this scope
 #define TXCIEn TXCIE1
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:187:36: note: in expansion of macro 'TXCIEn'
     UCSRnB = ((1 << TXENn) | (1 << TXCIEn));
                                    ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:124:16: note: suggested alternative: 'TXCIE0'
 #define TXCIEn TXCIE1
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:187:36: note: in expansion of macro 'TXCIEn'
     UCSRnB = ((1 << TXENn) | (1 << TXCIEn));
                                    ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:128:16: error: 'UCSR1C' was not declared in this scope
 #define UCSRnC UCSR1C
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:188:5: note: in expansion of macro 'UCSRnC'
     UCSRnC = BREAKFORMAT;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:128:16: note: suggested alternative: 'UCSRnC'
 #define UCSRnC UCSR1C
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:188:5: note: in expansion of macro 'UCSRnC'
     UCSRnC = BREAKFORMAT;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:132:16: error: 'UBRR1H' was not declared in this scope
 #define UBRRnH UBRR1H
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:191:5: note: in expansion of macro 'UBRRnH'
     UBRRnH = _DMX_dmxPreScale >> 8;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:132:16: note: suggested alternative: 'UBRRnH'
 #define UBRRnH UBRR1H
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:191:5: note: in expansion of macro 'UBRRnH'
     UBRRnH = _DMX_dmxPreScale >> 8;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:133:16: error: 'UBRR1L' was not declared in this scope
 #define UBRRnL UBRR1L
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:192:5: note: in expansion of macro 'UBRRnL'
     UBRRnL = _DMX_dmxPreScale;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:133:16: note: suggested alternative: 'UBRRnL'
 #define UBRRnL UBRR1L
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:192:5: note: in expansion of macro 'UBRRnL'
     UBRRnL = _DMX_dmxPreScale;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:122:16: error: 'UCSR1B' was not declared in this scope
 #define UCSRnB UCSR1B
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:193:5: note: in expansion of macro 'UCSRnB'
     UCSRnB = ((1 << TXENn) | (1 << UDRIEn));
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:122:16: note: suggested alternative: 'UCSR0B'
 #define UCSRnB UCSR1B
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:193:5: note: in expansion of macro 'UCSRnB'
     UCSRnB = ((1 << TXENn) | (1 << UDRIEn));
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:127:15: error: 'TXEN1' was not declared in this scope
 #define TXENn TXEN1
               ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:193:21: note: in expansion of macro 'TXENn'
     UCSRnB = ((1 << TXENn) | (1 << UDRIEn));
                     ^~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:127:15: note: suggested alternative: 'TXEN0'
 #define TXENn TXEN1
               ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:193:21: note: in expansion of macro 'TXENn'
     UCSRnB = ((1 << TXENn) | (1 << UDRIEn));
                     ^~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:125:16: error: 'UDRIE1' was not declared in this scope
 #define UDRIEn UDRIE1
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:193:36: note: in expansion of macro 'UDRIEn'
     UCSRnB = ((1 << TXENn) | (1 << UDRIEn));
                                    ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:125:16: note: suggested alternative: 'UDRIE0'
 #define UDRIEn UDRIE1
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:193:36: note: in expansion of macro 'UDRIEn'
     UCSRnB = ((1 << TXENn) | (1 << UDRIEn));
                                    ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:128:16: error: 'UCSR1C' was not declared in this scope
 #define UCSRnC UCSR1C
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:194:5: note: in expansion of macro 'UCSRnC'
     UCSRnC = DMXFORMAT; // send with 2 stop bits for compatibility
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:128:16: note: suggested alternative: 'UCSRnC'
 #define UCSRnC UCSR1C
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:194:5: note: in expansion of macro 'UCSRnC'
     UCSRnC = DMXFORMAT; // send with 2 stop bits for compatibility
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:132:16: error: 'UBRR1H' was not declared in this scope
 #define UBRRnH UBRR1H
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:197:5: note: in expansion of macro 'UBRRnH'
     UBRRnH = _DMX_dmxPreScale >> 8;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:132:16: note: suggested alternative: 'UBRRnH'
 #define UBRRnH UBRR1H
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:197:5: note: in expansion of macro 'UBRRnH'
     UBRRnH = _DMX_dmxPreScale >> 8;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:133:16: error: 'UBRR1L' was not declared in this scope
 #define UBRRnL UBRR1L
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:198:5: note: in expansion of macro 'UBRRnL'
     UBRRnL = _DMX_dmxPreScale;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:133:16: note: suggested alternative: 'UBRRnL'
 #define UBRRnL UBRR1L
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:198:5: note: in expansion of macro 'UBRRnL'
     UBRRnL = _DMX_dmxPreScale;
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:122:16: error: 'UCSR1B' was not declared in this scope
 #define UCSRnB UCSR1B
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:199:5: note: in expansion of macro 'UCSRnB'
     UCSRnB = ((1 << TXENn) | (1 << TXCIEn));
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:122:16: note: suggested alternative: 'UCSR0B'
 #define UCSRnB UCSR1B
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:199:5: note: in expansion of macro 'UCSRnB'
     UCSRnB = ((1 << TXENn) | (1 << TXCIEn));
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:127:15: error: 'TXEN1' was not declared in this scope
 #define TXENn TXEN1
               ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:199:21: note: in expansion of macro 'TXENn'
     UCSRnB = ((1 << TXENn) | (1 << TXCIEn));
                     ^~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:127:15: note: suggested alternative: 'TXEN0'
 #define TXENn TXEN1
               ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:199:21: note: in expansion of macro 'TXENn'
     UCSRnB = ((1 << TXENn) | (1 << TXCIEn));
                     ^~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:124:16: error: 'TXCIE1' was not declared in this scope
 #define TXCIEn TXCIE1
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:199:36: note: in expansion of macro 'TXCIEn'
     UCSRnB = ((1 << TXENn) | (1 << TXCIEn));
                                    ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:124:16: note: suggested alternative: 'TXCIE0'
 #define TXCIEn TXCIE1
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:199:36: note: in expansion of macro 'TXCIEn'
     UCSRnB = ((1 << TXENn) | (1 << TXCIEn));
                                    ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:128:16: error: 'UCSR1C' was not declared in this scope
 #define UCSRnC UCSR1C
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:200:5: note: in expansion of macro 'UCSRnC'
     UCSRnC = DMXFORMAT; // send with 2 stop bits for compatibility
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:128:16: note: suggested alternative: 'UCSRnC'
 #define UCSRnC UCSR1C
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:200:5: note: in expansion of macro 'UCSRnC'
     UCSRnC = DMXFORMAT; // send with 2 stop bits for compatibility
     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h: In function 'void _DMX_flush()':
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:119:16: error: 'UCSR1A' was not declared in this scope
 #define UCSRnA UCSR1A
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:209:10: note: in expansion of macro 'UCSRnA'
   while (UCSRnA & (1 << RXCn)) {
          ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:119:16: note: suggested alternative: 'UCSR0A'
 #define UCSRnA UCSR1A
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:209:10: note: in expansion of macro 'UCSRnA'
   while (UCSRnA & (1 << RXCn)) {
          ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:120:14: error: 'RXC1' was not declared in this scope
 #define RXCn RXC1
              ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:209:25: note: in expansion of macro 'RXCn'
   while (UCSRnA & (1 << RXCn)) {
                         ^~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:120:14: note: suggested alternative: 'RXC0'
 #define RXCn RXC1
              ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:209:25: note: in expansion of macro 'RXCn'
   while (UCSRnA & (1 << RXCn)) {
                         ^~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:134:14: error: 'UDR1' was not declared in this scope
 #define UDRn UDR1
              ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:210:16: note: in expansion of macro 'UDRn'
     voiddata = UDRn; // get data
                ^~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:134:14: note: suggested alternative: 'UDRn'
 #define UDRn UDR1
              ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:210:16: note: in expansion of macro 'UDRn'
     voiddata = UDRn; // get data
                ^~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h: In function 'void _DMX_writeByte(uint8_t)':
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:134:14: error: 'UDR1' was not declared in this scope
 #define UDRn UDR1
              ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:219:3: note: in expansion of macro 'UDRn'
   UDRn = data;
   ^~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:134:14: note: suggested alternative: 'UDRn'
 #define UDRn UDR1
              ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:219:3: note: in expansion of macro 'UDRn'
   UDRn = data;
   ^~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h: In function 'void USART1_RX_vect()':
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:119:16: error: 'UCSR1A' was not declared in this scope
 #define UCSRnA UCSR1A
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:228:21: note: in expansion of macro 'UCSRnA'
   uint8_t rxferr = (UCSRnA & (1 << FEn)); // get state before data!
                     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:119:16: note: suggested alternative: 'UCSR0A'
 #define UCSRnA UCSR1A
                ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:228:21: note: in expansion of macro 'UCSRnA'
   uint8_t rxferr = (UCSRnA & (1 << FEn)); // get state before data!
                     ^~~~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:136:13: error: 'FE1' was not declared in this scope
 #define FEn FE1
             ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:228:36: note: in expansion of macro 'FEn'
   uint8_t rxferr = (UCSRnA & (1 << FEn)); // get state before data!
                                    ^~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:136:13: note: suggested alternative: 'FE0'
 #define FEn FE1
             ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:228:36: note: in expansion of macro 'FEn'
   uint8_t rxferr = (UCSRnA & (1 << FEn)); // get state before data!
                                    ^~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:134:14: error: 'UDR1' was not declared in this scope
 #define UDRn UDR1
              ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:229:20: note: in expansion of macro 'UDRn'
   uint8_t rxdata = UDRn; // get data
                    ^~~~
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:134:14: note: suggested alternative: 'UDRn'
 #define UDRn UDR1
              ^
C:\Users\steve\Documents\Arduino\libraries\DMXSerial\src\DMXSerial_avr.h:229:20: note: in expansion of macro 'UDRn'
   uint8_t rxdata = UDRn; // get data
                    ^~~~
exit status 1
Error compiling for board Arduino Pro or Pro Mini.

I think I will just relegate this to the bin, otherwise it's another evening spent beating my head against the IDE/libraries

Well for some reason that library was toast. Re-installed and now my known good board uploads fine.
So it's this chip.

ATmega328P
U-TH
386/30

I think that is what is says.... difficult to see with OAP eyes

It is just totally ignored. Cannot see the chip at all.
I have clearly bricked it somehow and I assume that is a bootloader thing, but I cannot get any comms at all to even fix the bootloader.

Is it possible to brick a 328P, never to work again?

There is no power on this board, it's only powered from the USBasp for programming, so it's not died from bad power.

It loaded first time with the blink routine, but it was using its default 1Mhz clock.

So, looks like my best option is to unsolder it.... bin it and rob one off a Pro-Mini or something

OK.

So, changed the IC for another.

This flashes the led once a second if you upload to internal 1Mhz crystal.

If I select 16Mhz external Crystal (because that is what I have installed), it then flashes once every 5 seconds.

Is this because the fuse is still set at the internal 1Mhz?

So, to use the external 16Mhz, I need to bootload it with external 16Mhz?

Brilliant. Got a second dud IC now.....

Bootloaded at 16Mhz. It failed the bootload with the following error and now I can't talk to it

avrdude error: cannot set sck period; please check for usbasp firmware update
avrdude error: program enable: target does not answer (0x01)
avrdude error: initialization failed, rc=-1
        - double check the connections and try again
        - use -B to set lower ISP clock frequency, e.g. -B 125kHz
        - use -F to override this check

the selected serial port 
 does not exist or your board is not connected

Its the flipping caps

I had 20pf caps to ground. Just tried 18pf.... uploaded straight away

The wonders of solderless breadboards' interelectrode capacitance.

Wasn't a breadboard. It was a pre-made PCB

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.