自己動(dòng)手制造at89c2051編程器(英文)

2013-10-29 14:28:00
  • easy-downloader v1.1 f atmel 89c2051/4051 build your own a personal writer f programming hex code into flash based microcont

easy-downloader v1.1 f atmel 89c2051/4051 build your own a personal writer f programming hex code into flash based microcontroller at89c2051(2k) at89c4051(4k). simple hardware easy use software in dos window version. single-side double side pcb files included.acrobat files f pcb image.introductionthe first version of the easy-downloader was designed in 1997 to be used as a tool f my students on building her/his own microcontrollers circuit in the class ' designing microprocesss system'. the circuit features low-cost easy use. the latest version v1.1 was designed to be used with 2051 the newest 4051 chips. there is no separated functions like other programmer e.g., blank check, 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 the code is locked, it will erase first, then write verify... that all. hardwarefigure 1 depicts a circuit diagram of the easy-downloader. as shown, the circuit uses a 89c2051 with writer.hex firmware, 74ls373 8-bit latch, ds275-like, 7805, lm317 two transists, 2n2222a 2n2907a. the programming voltage control circuit is the same as recommended by atmel application note. it can be raised from 0v, 5v 12v by appropriated signal from p3. the 8-bit latch, 74ls373 provides some signal f ing the programming modes. a byte to be programmed 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) making pcb shown above, the file is easy-v1.pcb protel pcb version 2.76. the finished board should be tested without any chips; 1) +5v supply, 2) programming voltage 0v, 5v 12v by connecting the pin that control (p3.5 d) 2n2222a 2n2907 to +5v / gnd. the adapter output should be approx. 15vdc 100ma. figure 1: circuit diagram of easy-downloader v1.1acrobat 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 f providing us, the acrobat pcb file. top layer (80kb) easy-v2t.pdfbottom layer (36kb) easy-v2b.pdfcomponent layer (51kb) easy-v2o.pdf software two files that you should get are: writer.hex 4,871 bytes, the intel hex file firmware f 89c2051 chip ( the actual code size is 2021 bytes) , ez.exe 20,800 bytes the uploader program run on pc, send hex file to the downloader. the iginal writer.c program was written in 'c'. to modify, it needs micro c-compiler from dunfield development system ontario canada with tiny memy model.functional testuse a given programmer ( ready made easy-downloader) write the writer.hex into the 2051 chip. put the programmed 2051 chip to the board. invoke any communication software with 9600 baud, 8-data bit, no parity. connect db-9 to com1, say, press enter key, the title 'easy-downloader v1.1 f atmel 89c2051/4051' would be appeared on the screen. type >s2048 ( set byte counter to 2k), then without the 2051 chip in zif, type >r (read 2kb), on screen would show fffffffffff... indicating crected wiring f p1. if you put the chip having already program inside, r comm will show the hex code with the number of byte set by s comm. try e comm to erase the entire program!! all done. figure 2 shows example of using xtalk program to test the board. figure 2: using xtalk to test the boardnow try with 'ez' the uploader program to help you me easy to write the hex file to the chip. example of using ez is shown in figure 3. have fun... figure 3: example of using ez program writes the writer.hex to 2051 chip figure 4: example of using ez3 ez3.1downloadez uploader v3.0 f window the ez uploader provides a simple means of sending hex file to the writer board. to connect the board with ez, click available com pt, com1, say. after the ez recognizes the chips, then click send hexfile, that all. since there is no signature byte that indicates chip number programming voltage, thus you have to choose the appropriated memy size either 2051 4051 manually, i.e., 2048 4096 respectively. download ez uploader v3.1 f window an upgraded version of ez3 with raed save as features f reading hex code resided in the chip save as an intel hex file. tipshex file extensionsome assembler compiler produce output hex file with .obj instead of .hex. the ez needs .hex extension, just rename it... expensive zif socketwithout expensive zif socket, you may use an dinary socket instead, surely many times of pulling the chips may cause the far end leg of the 2051 chip broken. my student suggests me to one me socket to the 2051 chip. it wks very nice. even the programmer has zif, but your application board does not have. better to one socket to strengthen the 2051's leg. dc adapterany dc adapters, fixed adjustable can be used, a bridge diode crects polarity f the regulat 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 of 11.5 to 12.5v. putting right positionthe latest version does not include the protection circuit if putting wrong position, i.e., gnd-vcc vcc-gnd. thus befe put the chip into the programmer your application board, back to see your thought, say i am putting the 2051 chip to the right position, then pick the chip, place it... 89c1051there's no problem with 89c1051 chip but ensure that the hex code must less than 1024 bytes (000h to 3ffh). while verifying after erase it showed 0 to 2048 byte as the 2051 chip, it means twice reading, i.e., 000h-3ffh then 000h-3ffh, the same physical address. when programming, the control chip will write verify only the size of program.