Friday, 14 November 2014

AVRDUDE – Pagel and BS2 error

According to Wiki, the Pagel BS2 signals error that happens when you are programming an ATTiny85 (and apparently the 84 too) is a consequence of some missing configuration in the avrdude.conf file that comes with the Arduino.
Apparently, you need to correct the configuration problems and then everything will be fine. It is.
  1. Go to your Arduino IDE installation folder (something like C:\Program Files (x86)\arduino-1.0.4\hardware\tools\avr\etc.
  2. Before you do anything … make a backup of the file avrdude.conf
  3. Open the avrdude.conf file in a text editor
  4. locate the ATTiny85 section in the file
  5. locate the chip_erase_delay = 4500; line
  6. add the following two lines below this:
      pagel = 0xB3;
      bs2 = 0xB4;
  7. locate the memory=”lock” keyword in the ATTiny85 section
  8. replace this section with the following (copy and paste)
memory "lock"
   size  = 1;
   write = "1 0 1 0  1 1 0 0  1 1 1 x  x x x x",
           "x x x x  x x x x  1 1 i i  i i i i";
   read  = "0 1 0 1  1 0 0 0  0 0 0 0  0 0 0 0",
           "0 0 0 0  0 0 0 0  o o o o  o o o o";
   min_write_delay = 9000;
   max_write_delay = 9000;

Do the same for the ATTiny84 section.
You will need to restart the IDE for this to be affected.
After this, you need to
  1. Connect the ATTiny85 to the Arduino using your favourite ICSP
  2. load the sketch into the IDE
  3. Select the ATTiny85 board in the IDE
  4. Select Arduino as ISP in the IDE
  5. Upload your sketch to the ATTiny85.
That should fix the problem.
I have now tested the abovementioned fix and the error message has now gone away. To test this, I loaded the sketch from Tutorial 10, compiled and then uploaded it to the ATTiny85 with the following, successful, result.
As you can see, the Pagel and BS2 error messages have gone … YAY! Thank you Wiki Page!
After uploading the sketch to the ATTiny85, I dropped the ATTiny85 chip into the circuit and powered it up, again, success. The circuit does what it’s supposed to do.
All in all, happy camper time.

No comments:

Post a Comment

Paypal Donations

Donations to help me to keep up the lunacy are greatly appreciated, but NOT mandatory.