Few Linux commands used to program AT Tiny 45
See if a program is installed (in this case a avrdude)
Command: fab@fab-desktop:~$ which avrdude Answer: /usr/bin/avrdude
Install a program
Command:fab@fab-desktop:~$ sudo apt get install gvrasm Command:[sudo] password for fab: //Insert Fab Password
Run the program
Command:fab@fab-desktop:~$ gavrasm
Change Directory
Command:fab@fab-desktop:~$ cd Desktop
List Files
Command:fab@fab-desktop:~/Desktop$ ls
Run the gavrasm to transform asm file to a ".hex" file (hexadecimal)
Command:fab@fab-desktop:~/Desktop$ gavrasm hello.RGB.45.MTA.asm
Run the Avrdude comunicate to t45 using the parallel port
Command:fab@fab-desktop:~/Desktop$ avrdude -p t45 -c bsd -U flash:w:hello.RGB.45.MTA.hex Answer:avrdude: can't open device "/dev/parport0": Permission denied Answer:avrdude: failed to open parallel port "/dev/parport0"
List [ls] paralel port with detail [-l] (crw-rw----)
Command:fab@fab-desktop:~/Desktop$ ls -l /dev/parport0
Answer:crw-rw---- 1 root lp 99, 0 2010-01-14 11:30 /dev/parport0
Change permission to access parallel port, and insert fab user password
Command:fab@fab-desktop:~/Desktop$ sudo chmod 0766 /dev/parport0
Command:[sudo] password for fab:
List [ls] paralel port with detail [-l] and check the permission differences (crwxrw-rw-)
Command: fab@fab-desktop:~/Desktop$ ls -l /dev/parport0 Answer:crwxrw-rw- 1 root lp 99, 0 2010-01-14 11:30 /dev/parport0
Run the Avrdude comunicate to t45 using the serial (com) port and install the hexadecimal program "hello.RGB.45.hex"
Command:fab@fab-desktop:~$ avrdude -p t45 -c dasa -P /dev/ttyS0 -U flash:w:hello.RGB.45.hex
Answer:== Run the Avrdude comunicate to t45 using the serial (com) port and install the hexadecimal program "hello.RGB.45.hex" Answer:if you Answer:are not in the directory where the file is. In this example is w:/home/fab/Desktop/hello.RGB.45.hex ==
Command:fab@fab-desktop:~$ avrdude -p t45 -c dasa -P /dev/ttyS0 -U flash:w:/home/fab/Desktop/hello.RGB.45.hex
Answer:avrdude: AVR device initialized and ready to accept instructions
Answer:Reading | ################################################## | 100% 0.00s
Answer:avrdude: Device signature = 0x1e9206 Answer:avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed Answer: To disable this feature, specify the -D option. Answer:avrdude: erasing chip Answer:avrdude: reading input file "hello.RGB.45.hex" Answer:avrdude: error opening hello.RGB.45.hex: No such file or directory Answer:avrdude: input file hello.RGB.45.hex auto detected as invalid format Answer:avrdude: can't open input file hello.RGB.45.hex: No such file or directory Answer:avrdude: write to file 'hello.RGB.45.hex' failed
Answer:avrdude: safemode: Fuses OK
Answer:avrdude done. Thank you.
Answer:avrdude: AVR device initialized and ready to accept instructions
Answer:Reading | ################################################## | 100% 0.00s
Answer:avrdude: Device signature = 0x1e9206 Answer:avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed Answer: To disable this feature, specify the -D option. Answer:avrdude: erasing chip Answer:avrdude: reading input file "/home/fab/Desktop/hello.RGB.45.hex" Answer:avrdude: input file /home/fab/Desktop/hello.RGB.45.hex auto detected as Intel Hex Answer:avrdude: writing flash (148 bytes):
Answer:Writing | ################################################## | 100% 0.07s
Answer:avrdude: 148 bytes of flash written Answer:avrdude: verifying flash memory against /home/fab/Desktop/hello.RGB.45.hex: Answer:avrdude: load data flash data from input file /home/fab/Desktop/hello.RGB.45.hex: Answer:avrdude: input file /home/fab/Desktop/hello.RGB.45.hex auto detected as Intel Hex Answer:avrdude: input file /home/fab/Desktop/hello.RGB.45.hex contains 148 bytes Answer:avrdude: reading on-chip flash data:
Answer:Reading | ################################################## | 100% 0.05s
Answer:avrdude: verifying ... Answer:avrdude: 148 bytes of flash verified Answer:avrdude: safemode: Fuses OK Answer:avrdude done. Thank you.