转载时请注明出处:
http://hi.baidu.com/%B5%FB%CF%FE%C3%CE/blog/item/1aa1050958898c2e6a60fbd0.html
蝶晓梦(vowstar@gmail.com)今天终于琢磨出来怎么在Linux下烧录AT89s52.
下面是我的方法...当然可能有更好的方法.
这里以Ubuntu为例子,先安装avrdude.
用下面的命令一次装全吧:sudo apt-get install gcc-avr binutils-avr avrdude avr-libc然后编辑avrdude.conf:sudo gedit /etc/avrdude.conf在最后面加入AT89s52的相关信息(这是Joy Shukla写的)#------------------------------------------------------------
# Below chips by added by me .. Joy Shukla(joy_shukla@yahoo.in)
# these chips can be programmed with my usbasp programmer(changed atmega8 program)
# after adding avrdude support in this file ..
#------------------------------------------------------------ #------------------------------------------------------------
# AT89S52
#------------------------------------------------------------
part
id = "8052";
desc = "AT89S52";
signature = 0x1E 0x52 0x06;
chip_erase_delay = 20000;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x"; chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x"; timeout = 200;
stabdelay = 100;
cmdexedelay = 25;
synchloops = 32;
bytedelay = 0;
pollindex = 3;
pollvalue = 0x53;
predelay = 1;
postdelay = 1;
pollmethod = 0; memory "flash"
size = 8192;
paged = no;
min_write_delay = 4000;
max_write_delay = 9000;
readback_p1 = 0xff;
readback_p2 = 0xff;
read = " 0 0 1 0 0 0 0 0",
" x x x a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o"; write = " 0 1 0 0 0 0 0 0",
" x x x a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
mode = 0x21;
delay = 12;
; memory "signature"
size = 3;
read = "0 0 1 0 1 0 0 0 x x x 0 0 0 a1 a0",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
;
#------------------------------------------------------------
然后保存
现在就可以烧录AT89S52的单片机了,
例如我想烧录放在桌面上的编译好的跑马灯程序,
用命令sudo avrdude -p 8052 -c usbasp -e -U flash:w:"/home/vowstar/桌面/跑马灯.hex"即可效果如图:开发板上的效果:Firefox 3.7/4.0的Linux版模型设计图Ubuntu 9.10正式版海量截图赏析相关资讯 Linux教程
- Linux教程:如何在命令行中查看目 (07/28/2014 12:22:23)
- Linux 修改root密码 (11/03/2012 07:53:38)
- su - root 与su root的区别 (06/06/2012 00:39:40)
| - Linux进程间通信:消息队列 (01/28/2013 09:43:00)
- U盘安装Linux开机无法启动解决方法 (10/07/2012 08:55:52)
- Windows 7/Linux 同步时间 (05/15/2012 06:17:55)
|
本文评论 查看全部评论 (0)