2012-04-27, 15:28:05
(This post was last modified: 2012-12-25, 17:05:50 by Mikael Gustavsson.)
I wonder if I could get some pointers for modifying the DS30 bootloader to work with a MAX222 RS232 level shifter that features a low power shutdown mode. Pin 18 on this device must be set high to enable any communication on the TX and RX pins. I had been using a very standard MAX232 IC, and it worked fine (both with the bootloader and otherwise) except that it uses about 10mA of current during standby. To save some power, I dropped in a MAX222, and attached the Shutdown pin to PortB.1 on the PIC18f25k22. If I program the PIC directly (no bootloader) everything works. However, when I try to use the bootloader, the software cannot find the PIC because the MAX222 is shut down. If I connect the shutdown pin directly to 5V on the board, then the bootloader works fine.
So, what I would like to do is modify the code so that PortB.1 is held high throughout the execution of the bootloader. I use PICBASIC PRO to do most of my programming, so I'm pretty shaky with assembly. I tried putting "bsf PORTB, 1" Near the beginning of the bootloader assembly code, but that did not work (seemed to have no effect). Can anybody clue me in as to how to activate the MAX222 when the bootloader is executing?
So, what I would like to do is modify the code so that PortB.1 is held high throughout the execution of the bootloader. I use PICBASIC PRO to do most of my programming, so I'm pretty shaky with assembly. I tried putting "bsf PORTB, 1" Near the beginning of the bootloader assembly code, but that did not work (seemed to have no effect). Can anybody clue me in as to how to activate the MAX222 when the bootloader is executing?