| ??? 10/02/07 15:06 Modified: 10/02/07 15:09 Read: times |
#145243 - try this code Responding to: ???'s previous message |
This one works for me. The power supply/reset circuit is the same as this one:
http://chaokhun.kmitl.ac.th/~kswichit...1/easy.htm. I don't use a 74HC373 because I have a 40 pin 89C52 which has enough pins to do the job. The 89C52 runs with a 16MHz crystal. Read_Sig: lcall InitPowerUp mov dptr,#Sigbits_Str ; lcall print_string mov r7,#002h ;2 bytes to receive setb Prog clr P33 clr P34 clr P35 clr P37 lcall Delay ;385.50us @ 16 MHz mov a,#0ffh mov P1,a nop nop Read_Sig1: mov a, P1 lcall h2a ;print ascii to terminal with space lcall PulseXtal ;inc address counter djnz r7,Read_Sig1 ;read 2 bytes ljmp End_Prog ;end prog ;------------------------------------------------------ ;resets device,leaves 5V connected to reset InitPowerUp: setb LM317 ;disconnect VPP from reset, leaving reset low clr Xtal ;ensure LOW setb Vpp ;5V to reset clr LM317 ;join Vpp to reset setb Busy ;Busy = input setb Prog ;keep Prog high lcall Del_100mS ;100mS Delay ret ; ;------------------------------------------------------ ;pulse Xtal1 to increment address counter by one. PulseXtal: setb Xtal nop nop clr Xtal ret I don't know if this will help you or not? Good Luck |
| Topic | Author | Date |
| AT89c2051 power up sequence | 01/01/70 00:00 | |
| any schematics? | 01/01/70 00:00 | |
| No schematics right now | 01/01/70 00:00 | |
| at least... | 01/01/70 00:00 | |
| Single step | 01/01/70 00:00 | |
| And what was it, then? | 01/01/70 00:00 | |
| RE: And what was it, then? | 01/01/70 00:00 | |
| what LCD? | 01/01/70 00:00 | |
| RE: what LCD | 01/01/70 00:00 | |
| OK so why was the LCD blank? | 01/01/70 00:00 | |
| RE: OK so why was the LCD blank? | 01/01/70 00:00 | |
| data conflict/posting pictures | 01/01/70 00:00 | |
| RE:data conflict/posting pictures | 01/01/70 00:00 | |
| Schematics | 01/01/70 00:00 | |
| Complete schematic | 01/01/70 00:00 | |
| please use smaller pictures and png/gif | 01/01/70 00:00 | |
| Done | 01/01/70 00:00 | |
| Using 2051 | 01/01/70 00:00 | |
| make a full terminal from U3 | 01/01/70 00:00 | |
| Add some diodes | 01/01/70 00:00 | |
| RE:Add some diodes | 01/01/70 00:00 | |
| Multiplexing | 01/01/70 00:00 | |
| Pull ups | 01/01/70 00:00 | |
| Not required. | 01/01/70 00:00 | |
try this code | 01/01/70 00:00 |



