自制ATMEL AT89C2051编程器AT89C4051烧录器
Easy-Downloader V1.1for ATMEL89C2051/4051
Build your own a personal writer for programming HEX code into Flash based microcontroller AT89C2051(2k)and AT89C4051(4k).Simple hardware and Easy use software in DOS and Window version.Single-side and double side PCB files included.Acrobat files for PCB image.
Introduction The first version of the Easy-Downloader was designed in1997to be used as a tool for my students on building her/his own microcontrollers circuit in the class"Designing Microprocessors System".The circuit features low-cost and easy use.The latest version V1.1was designed to be used with2051and the newest4051chips.There is no separated functions like other ,blank che
ck,erase,write.Simply type say,c:\..>ez hello,the hex file"hello.hex"will then be programmed to the chip automatically.If the chip is not blank or the code is locked, it will erase first,then write hat all.
Hardware Figure1depicts a circuit diagram of the Easy-Downloader.As shown,the circuit uses a89C2051with writer.hex firmware,74LS3738-bit latch,DS275-like,7805,LM317and two transistors,2N2222A and2N2907A. The programming voltage control circuit is the same as recommended by ATMEL application note.It can be raised from0V,5V and12V by appropriated signal from P3.The8-bit latch,74LS373provides some signal for selecting the programming modes.A byte to be programmed or read back is sent/received through P1.Incrementing address is done by pulsing a positive pulse to XTAL pin.The circuit may be built using simple point-to-point soldering with a general purpose PCB(fish's egg like PCB)or making PCB shown above,the file is Protel PCB version2.76.The finished board should be tested without any chips;1)+5V supply,2)programming voltage0V,5V and12V by connecting the pin that control(P3.5and D)2N2222A and2N2907to+5V and/or GND.The adapter output should be approx.15Vdc100mA.
Figure1:Circuit Diagram of Easy-Downloader V1.1
Acrobat PCB Files
As suggested by a friend from Romania,Puiu Chiselita,to provide PCB image in Acrobat file,so I have asked my friend,Jaroon Keawkhrua.He made within an hour,thanks again for providing us,the Acrobat PCB file. Software
Functional Test Use a given programmer(or ready made Easy-Downloader)write the writer.hex into the2051chip. Put the programmed2051chip to the board.Invoke any communication software with9600baud,8-data bit,no parity.Connect DB-9to COM1,say,press enter key,the title"Easy-Downloader V1.1for ATMEL89C2051/4051" would be appeared on pe>s2048(set byte counter to2k),then without the2051chip in ZIF,type>r (read2kB),on screen would indicating corrected wiring for P1.If you put the chip having already program inside,r command will show the hex code with the number of byte set by s command.Try e command to erase the entire program!!All done.Figure2shows example of using Xtalk program to test the board.
Figure2:Using Xtalk to test the board
Now try with"ez"the uploader program to help you more easy to write the hex file to the chip.Example of using ez is shown in Figure3.
Figure3:Example of using EZ program writes the writer.hex to2051chip
include中文
Figure4:Example of Using EZ3and EZ3.1
The EZ Uploader provides a simple means of sending HEX file to the writer board.To connect the board with EZ, click available COM port,COM1,say.After the EZ recognizes the chips,then click Send Hexfile,that all.Since there is no signature byte that indicates chip number and programming voltage,thus you have to choose the appropriated memory size ,2048or4096respectively.
Tips
HEX file extension Some Assembler or Compiler produce output hex file with.OBJ instead of.HEX.The EZ needs .HEX extension,just
Expensive ZIF Socket Without expensive ZIF socket,you may use an ordinary socket instead,surely many times of pulling the chips may cause the far end leg of the2051chip broken.My student suggests me to insert one more socket to the2051chip.It works very nice.Even the programmer has ZIF,but your application board does not have. Better to insert one socket to strengthen the2051's leg.
DC Adapter Any DC adapters,fixed or adjustable can be used,a bridge diode corrects polarity for the re
gulator IC eventually.Many adapters provide higher DC output than the value labeled,to ensure,check the proper programming voltage that must be in the range of11.5to12.5V.
Putting Right PositionThe latest version does not include the protection circuit if putting wrong ,GND-Vcc<-->Vcc-GND.
Thus before put the chip into the programmer or your application board,back to see your thought,say I am putting the2051chip to the right position,then pick the chip,and
89C1051There's no problem with89C1051chip but ensure that the hex code must less than1024bytes(000H to
3FFH).While verifying after erase it showed0to2048byte as the2051chip,it means twice ,000H-
3FFH then000H-3FFH,the same physical address.When programming,the control chip will write and verify only the size of program.
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论