Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/29/04 13:24
Modified:
  12/29/04 13:30

Read: times


 
#84034 - An example worth 3E8h words :-)
Responding to: ???'s previous message
I was talking about OPTIONS. It can be easily done. A small demo follows.

OK, so first a disclaimer:
The presented program is for TEST PURPOSES ONLY.
In no case should be used for production etc.
Use only at your own risk.
May damage your chip, destroy your boards, your house may catch fire.
Absolutely NO responsibility for any consequences.

Caution:
Keep a parallel programmer handy to restore your original bootloader (not necessary, I did without it; only in case something goes wrong).
When finished with this experiment, the original bootloader (downloadable from Philips site) should be restored.
Use only with P89V51RD2 with bootloader version 4 or 5.

Usage:
- make sure you have bootloader V4 or V5.
- burn the following file into the P89V51RD2 in a conventional way
http://www.efton.sk/t0t1/V_TEST1.HEX
- disconnect pin p3.4 from any device that may drive it high (it will turn into an output during bootloader action)
- connect to serial, start a suitable terminal program (recommended setting: 9600/8/n/1/no handshake)
- reset
- wait at least 400ms
- press U, should write "Patching", detect the proper version of bootloader and write "done".
- reset
- notice, now you are unable to enter the bootloader sending U during the first (400)ms; but on receiving the U, the user program (V_TEST1.HEX) starts again, detecting again the bootloader version, but now writing "already patched"
- to enter the bootloader, first set the PC's Tx/RD2's Rx to permanently BREAK (use e.g. realterm.sourceforge.net, it is capable to do it) or do it in a hardware way; reset; BREAK needs to be ON for at least about 140000 cycles (65536 x djnz), which is about 150ms at 12MHz; now release BREAK (a nice edge, no spikes!) and transmit U, it echoes U back - now you are in the bootloader, so you can for example try :020000050002F7 which should return 04 or 05 (the version) and a dot
- notice, that p3.4 is now the "Tx active" (direction turning for RS485) although may need inverting depending on your HW configuration
- now you can erase the user code space (block 0) and burn the "upgrader" for version 5 from the Philips website to revert to the original version - follow the manual given there

Enjoy!

Jan Waclawek


List of 26 messages in thread
TopicAuthorDate
RS485 Contention.            01/01/70 00:00      
   485 ISP            01/01/70 00:00      
      RS485 'U' & ISP            01/01/70 00:00      
         the crux            01/01/70 00:00      
            Flashmagic !!!!            01/01/70 00:00      
            RS485 contention            01/01/70 00:00      
            Cygnal F12x            01/01/70 00:00      
            Reply to Erik            01/01/70 00:00      
               FM< half duplex            01/01/70 00:00      
                  Reply to Erik            01/01/70 00:00      
                     bus direction            01/01/70 00:00      
                        A few comments            01/01/70 00:00      
                           comnments on comments            01/01/70 00:00      
                              comments^3            01/01/70 00:00      
                                 boot NIT            01/01/70 00:00      
                                    An example worth 3E8h words :-)            01/01/70 00:00      
            A fundamental query - Erik            01/01/70 00:00      
               testing            01/01/70 00:00      
   RS 485 Contention            01/01/70 00:00      
      RS485 Contention            01/01/70 00:00      
   Switch ?            01/01/70 00:00      
      RS485 contention            01/01/70 00:00      
   Possible solutions.            01/01/70 00:00      
   Thanks Erik.            01/01/70 00:00      
   SOLUTION            01/01/70 00:00      
      Thanks but thats not the solution            01/01/70 00:00      

Back to Subject List