 |
 |
| View previous topic :: View next topic |
| Author |
Message |
RckRllRfg
Joined: 20 Jul 2011 Posts: 60
|
| The use of the delay_ms command may be the culprit |
Posted: Fri Aug 26, 2011 6:03 pm |
|
|
Update:
In looking at the .lst file, I found a number of calls being made to address 414 when I used the delay_ms command in the code.
I am using RS-485 with a half duplex. I have to control the transceiver. I have found that I have to put a 10ms delay after using the putchar commmand (or longer if I am using the fprintf command) to ensure that the message is completely sent prior to switching the transceiver to the receive mode.
So, I think I will create a function with memory space allocated to it that simply contains the delay. I'll update everyone as I make progress. Any recommends are truly welcomed.
Regards -
RckRllRfg |
|
 |
RckRllRfg
Joined: 20 Jul 2011 Posts: 60
|
| Got it working! |
Posted: Fri Aug 26, 2011 7:26 pm |
|
|
Though its not optimal, but I'll take it....!
I added a #Separate command to a function I created called TXdelay. It is nothing more than:
void TXdelay(void)
{
delay_ms(10);
}
Granted, this could be very much embellished; however, I need to keep things moving.
Then I found that when I compiled it, it was sending this command between addressed 10 thru 20. The rest was then sent to the 414 address space.
I then tried to force it out of that space low memory space by changing the #ORG 0x20, 0x7A to #ORG 0x10, 0x7A
BUT, that only encourage the compiler to put the whole thing back into the address 414.
So, since I had more than enough memory for the main, I change it to:
#ORG 0x30, 0x7A
This was enough to keep it out of the 400h area of the code.
Are there better ways of doing this? I hope so and I am up for any ideas. But, at this point, I am able to get the bootload.c loaded, so I am a happy camper.
 |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|