ATTiny2313: Chip erase won't work.

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have connected an ATTIny2313 to an FTDI232BL chip on a PCB, and tried to connect everything such that I could program the 'Tiny using bitbanging on the FTDI chip.

I downloaded a patch from Tuxgraphics.org for UISP, which enabled the desired functionality.

I have one or two signals connected to different bits, so I changed the defines around, and it nicely reports that it finds an ATTiny2313.

Next it wouldn't program, so I changed the Pagesize from "0" (page mode disabled) to 32 (16 words) (bottom table on page 164 of the datasheet).

So now I can program bits in the flash from "1" to "0", but anything requiring an erase doesn't work.

Oh. Fuse bits can be programmed either way. (well, at least one of them. I'm afraid I'll lose the ability to do the LV ICSP if I find a combination that disables this. So I've found one bit I can safely program up and down, and that works...)

Just tested: Writing to the eeprom also works:

avr> rd 10
eeprom: $aa
avr> wr 10 55
avr> rd 10
eeprom: $55
avr> 

I've checked that the "chip erase" command that is being sent to the chip corresponds to the code in the datasheet.

The Tiny2313 is specified for 2.7 - 5.5V operation, I'm using it at 3.3V. (how would the LM1085 react if I short it's 3.3V output with the 5v input, to test it at 5V?)

Does anybody have an idea about what to try or what could be wrong?

[edit] Tested "chip erase" at 5V, still nothing changed. At http://lists.pld-linux.org/mailman/pipermail/pld-cvs-commit/Week-of-Mon-20060501/103985.html
someone had exactly the same pagesize problem with uisp and the attiny2313. I came up with exacltly the same 2-byte patch to the source.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Problem solved: Avrdude with my patch to make it work with my ftdi bitbang hardware works!