Monday, November 27, 2006

communication with AVR established!

By a bizzare turn, I happened to get communication with the AVR established - I have uploaded my program! :) Funny how things happen - I had given up on getting the AVR programmed via the parallel port and was going to try a serial method that Michael had found; I was closing out tabs in my browser and one happened to be pointing at this post about disabling the parallel port on the VMWare site. It made me suspect that my parallel port in my VM was not set for bidirectional communication, so I manually edited my VMX file to add 3 lines... and it worked!

parallel0.present = "TRUE"
parallel0.fileName = "LPT1"
parallel0.bidirectional = "TRUE"


Assuming the same old error as before, I ran uisp and got a nice little surprise!

uisp -dlpt=/dev/parport0 --erase -dprog=dapa
Atmel AVR ATtiny2313 is found.
Erasing device ...
Reinitializing device
Atmel AVR ATtiny2313 is found.
uisp -dlpt=/dev/parport0 --upload if=avrledtest.hex -dno-poll -dprog=dapa -v=3 --hash=32
Reset inactive time (t_reset) 1000 us
AVR Direct Parallel Access succeeded after 0 retries.
Vendor Code: 0x1e
Part Family: 0x91
Part Number: 0x0a
Atmel AVR ATtiny2313 is found.
Page Write Disabled
FLASH Write Delay (t_wd_flash): 11111 us
EEPROM Write Delay (t_wd_eeprom): 11111 us
Uploading: flash
#####
(total 138 bytes transferred in 1.71 s (81 bytes/s)
Now - if only my code worked right :) But that is my own bug and I can fix that!

One other great thing that I learned in this experience is that the Add / Remove Programs wizard (in Ubuntu) has an Advanced tab that allows you to select specific packages. Michael pointed out the Advanced tab and that uisp is in the package list! Good stuff.

No comments: