works running debug but not when programmed
thomasschubert
Posts: 15
Hi all
Im having some huge issues with the SX compiler, I have alsways written in assembler and have never come across this issue.
I have a program that runs with the internal 4MHZ SX28 clock, Im using Serout and Serin uart commands. When I run debug the data Im sending out looks good at 96,n,8,1.
Im using hyperterminal to view the data.
When I program the device, I get rubbish, looks like its off on the serout timming. I thought maybe at 9600 this may to too quick for 4MHZ so I changed to 50MHZ and recomplied and still the same data issues.
Anyone have this problem, Im under the gun on this project.
Below are my osc settings
DEVICE SX28, OSC4MHZ, TURBO, STACKX, OPTIONX
FREQ 4_000_000
IRC_CAL IRC_FAST
ID "Controller"
Thanks
Im having some huge issues with the SX compiler, I have alsways written in assembler and have never come across this issue.
I have a program that runs with the internal 4MHZ SX28 clock, Im using Serout and Serin uart commands. When I run debug the data Im sending out looks good at 96,n,8,1.
Im using hyperterminal to view the data.
When I program the device, I get rubbish, looks like its off on the serout timming. I thought maybe at 9600 this may to too quick for 4MHZ so I changed to 50MHZ and recomplied and still the same data issues.
Anyone have this problem, Im under the gun on this project.
Below are my osc settings
DEVICE SX28, OSC4MHZ, TURBO, STACKX, OPTIONX
FREQ 4_000_000
IRC_CAL IRC_FAST
ID "Controller"
Thanks
Comments
Hi, theres somthing strange with the compiler calculating the timming for serout and in commands. Running at 4MHZ internal, I do realize there is a 5% error I had to set the baud rate to 8600, not 9600. Im now using a 50MHZ resonator, still the timming is not right. As I cant run the SX debugger at 50MHZ, Im not sure how I figure out what the error here is.
It may also be the Device directive that wrong, please see my directive below.
DEVICE SX28,oschs2,TURBO
IRC_CAL IRC_SLOW
This is what i used on prevous projects Ive designed but using ASM not the compiler.
Can you post your whole program -- as an attachment?