It only jumps to a timeout label if you tell it where the label is.
Code:Main: high led : pause 50 : low led Serin FromRx,N2400,200,Main,["pp3"],code .....rest fo the code here
It only jumps to a timeout label if you tell it where the label is.
Code:Main: high led : pause 50 : low led Serin FromRx,N2400,200,Main,["pp3"],code .....rest fo the code here
Sorry for the code, I have missed the *Main* while writing the question. It actually is there in my code.
I will correct my code statements to the following:
The code enters main label and led blinks, but then it stops. I expect it to blink after every 200mS which is not happening.Code:Main: high led : pause 50 : low led Serin FromRx,N2400,200,Main,["pp3"],code .....rest of the code here goto Main
Couple of times this happened as well that program entered main label, led blinked few times lets say 5 or 6 after every 200mS but then it stopped again.
I cannot understand this erratic behaviour of my PIC.
The timeout period gets continuously reset if there's noise on the serial input pin. If you're trying to use this option with a noisy RF receiver, the timeout/label approach isn't going to work.
Are there any other options?
I tried removing timeout period and use DT Interrupts, but it gave list of following errors.
Code:Executing: "C:\PBP\PBPW.EXE" -ampasmwin -oq -z -p12F635 "TxRx.bas" PICBASIC PRO(TM) Compiler 2.50b, (c) 1998, 2008 microEngineering Labs, Inc. All Rights Reserved. ERROR: Variable wsave3 position request 416 beyond RAM_END 127. ERROR: Variable wsave2 position request 288 beyond RAM_END 127. ERROR: Variable wsave1 position request 160 beyond RAM_END 127. ERROR: Unable to fit variable wsave ERROR: Unable to fit variable RS1_Save ERROR: Unable to fit variable RS2_SaveHalting build on first failure as requested. BUILD FAILED: Thu Dec 31 14:13:38 2009
Open DT_INTS-14.bas and read the first few lines about the wsave errors.
Thanks for showing the starting point. I have fired a bullet in the dark as I do not know much about ASM, banks and stuff. BUT it has reduced the errors.
I still have few errors left.
My DT_IN... .bas looks like this now:
And the errors are following:Code:;wsave var byte $20 SYSTEM ' location for W if in bank0 wsave var byte $70 SYSTEM ' alternate save location for W ' if using $70, comment out wsave1-3 ' ' --- IF any of these three lines cause an error ?? ---------------------------- ' Comment them out to fix the problem ---- ' -- It depends on which Chip you are using, as to which variables are needed -- ;wsave1 var byte $A0 SYSTEM ' location for W if in bank1 ;wsave2 var byte $120 SYSTEM ' location for W if in bank2 ;wsave3 var byte $1A0 SYSTEM ' location for W if in bank3
ThanksCode:Executing: "C:\PBP\PBPW.EXE" -ampasmwin -oq -z -p12F635 "TxRx.bas" PICBASIC PRO(TM) Compiler 2.50b, (c) 1998, 2008 microEngineering Labs, Inc. All Rights Reserved. ERROR: Unable to fit variable RR2_Save ERROR: Unable to fit variable RS1_Save ERROR: Unable to fit variable RS2_SaveHalting build on first failure as requested. BUILD FAILED: Thu Dec 31 16:29:42 2009
OK, did some lookaround for the problem.
I have also commented in ReEnterPBP.bas the following
Now it seems that I am quiet near but one warning message is there still :Code:' T3_Save VAR WORD ' T4_Save VAR WORD
Any advise if I should be bothered about the warning message?Code:Executing: ........"TxRx.bas" PICBASIC PRO(TM) Compiler 2.50b, (c) 1998, 2008 microEngineering Labs, Inc. All Rights Reserved. Warning[206] D:\BACKUP.........TXRX.ASM 752 : Found call to macro in column 1. (INT_CREATE) Loaded D:\Backup..................TxRx.COD. BUILD SUCCEEDED: Thu Dec 31 16:39:22 2009
The 12F635 only has 64 bytes SRAM so if you're using DT ints with a PBP int handler you may need to free up some SRAM, and keep your int handler as simple as possible.
Hard to say without seeing what you're doing.
Hi Bruce, it seems we jumped across each others post at the same time. I have succeeded in building the project but a warning is there.
Should I worry about it? Thanks for all the help.Code:Warning[206] D:\BACKUP.........TXRX.ASM 752 : Found call to macro in column 1. (INT_CREATE)
P.S. Is there any online calculator around which can easily advise me when to expect the interrupt with TMR1 with 1:8 prescaler (4MHz) and also if DT Interrupts work with TMR0 in 12F635?
Last edited by Megahertz; - 31st December 2009 at 15:54.
Bookmarks