fast UART bootloader ATtiny13 (0.8s) ... ATmega644 (8.2s)

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

I have updated my Bootloader (V1.4):

http://www.avrfreaks.net/index.p...

Now CRC16 of the connection and verify after programming was supported.

The bootloader support autobauding (1200..115200 Baud) and works still, even if the reset pin was disabled.

Peter

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

Hi, found this great project today.

Since mine small project uses DIP version of attiny all pins are in use. Furthermore circuit will be in such a place that normal ISP programming using SPI became unpractical.

So if i understood right, I'll declare pins used to STX (transmit)(PB1) and SRX (receive)(PB0) at bootload.asm. Activate chip I'm using by uncommenting necessary .inc file (tn13def.inc) and build. I managed to create AVRstudio project and compile code without errors.

So far so good ...
Now i need to program attiny in ISP board. Program Disable reset pin fuse and move chip into target circuit.

Since this operation breaks ISP I'm checking that i understood this right.

Next I'll need serial cable from computer to attiny13.
Connect serial 2 to attiny PB1 and serial 3 to PB0. I'll launch fboot.exe ..

Yes, i do need software to upload into attiny also. Lets say that is in software.hex.

Next step is bit unclear. could someone shed some light on this?

One thing .. since I'm using one pin for button and bootload.asm has comment about inverted ONEWIRE. It makes me wonder if i could use this one pin for bootloading.

Could someone explain this a bit. Does this require support from chip? etc.

Project which i'm working is bicyle light controller. It is hobby project of few friends of mine.

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

CoolHammer wrote:

So far so good ...
Now i need to program attiny in ISP board. Program Disable reset pin fuse and move chip into target circuit.

Since this operation breaks ISP I'm checking that i understood this right.

Next I'll need serial cable from computer to attiny13.
Connect serial 2 to attiny PB1 and serial 3 to PB0. I'll launch fboot.exe ..

Yes, i do need software to upload into attiny also. Lets say that is in software.hex.

Next step is bit unclear. could someone shed some light on this?

One thing .. since I'm using one pin for button and bootload.asm has comment about inverted ONEWIRE. It makes me wonder if i could use this one pin for bootloading.
mine.

Quote:
1:
Don't ever connect your PC's serial RS-232 line directly to the Tiny. You will prob. kill it , as the RC232 from the PC is +/- 12v.

You need to make an adapter to convert the RS232 to TTL (ie. a MAX232 if 5v on tiny).

Quote:
2:
You can either use 2 pins as you describe , or use only 1 pin (OneWire) , i have only tried the 2'pin version.

Quote:
3: You don't have to disable (make it an io) the Reset Pin
Peter just says that if you use the "Onewire mode" , and disables the Reset , then it won't cost any pins. As Reset is no longer REQUIRED to program the chip via ISP. In fact don't disable the reset before you have succesfully programemd a functional loader in the chip. And if i were you i'd use another pin for the loader , then you can make sure (test) that the loader works , before you "Claim" that extra I/O pin (Reset).

The German thread is here
http://www.mikrocontroller.net/t...

And the "man page ..."
http://www.mikrocontroller.net/a...

HTH

/Bingo

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

CoolHammer,

I am having problems compiling this code using avra for tiny13. is there any chance you could post your compiled .hex along with a simple pinout for me to try? Thanks.

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

santacruzbob wrote:
CoolHammer,

I am having problems compiling this code using avra for tiny13. is there any chance you could post your compiled .hex along with a simple pinout for me to try? Thanks.

Use avrasm2.exe from the avrstudio install
It also runs under Linux in Wine

I made this post , just for building Peters bootloader under linux :
http://www.avrfreaks.net/index.p...

/Bingo