Hello all,
I currently have a project that involves two 40X2's that I need some assistance on.
The first 40X2 is a remote using a DORJI wireless module (essentially 3 pushbuttons to start, stop and reset a clock wirelessy)
The second 40X2 receives the serial commands using a 2nd DORJI module and shows a countdown clock with mins, seconds and hundredths on an LCD Display.
How it works...
The remote transmits every ~350mSec a check byte ($55) and the button status (Button 1, 2 ,3 or null).
The receiver looks at the received button byte and starts, stops or resets the 30min countdown clock. (Countdown is performed within the interrupt routine)
When start is pressed the following command is performed to start the clock
setintflags %10000000,%10000000
When stop is pressed the following command is performed to stop the clock
setint off
All was going well until I discovered an issue involving the Timer and HSERIN command.
The Serial command I was originally using is this:
hserin [500,exittransmit],0,1,($55) 'Receive console button status
However I found that when I had the DORJI module plugged in, the countdown values would speed up (i.e. the serial reception was affecting the timer).
I thought the timeout value in the hserin command maybe be the problem so I changed the command to the following:
hserin 0,1,($55) 'Receive console button status
With the DORJI module plugged in the countdown values work.
However when I unplug the DORJI module, the timer does not generate an interrupt at all!
(I fear the serial module is generating the interrupts!).
Furthermore I also tried using background receive however it appears you cannot have two interrupt flags (toflag and hserflag) generating interrupts!
Is it possible that the timer and serial port are connected in some way?
Any thoughts on a solution to this would be most appreciated!
thanks
I currently have a project that involves two 40X2's that I need some assistance on.
The first 40X2 is a remote using a DORJI wireless module (essentially 3 pushbuttons to start, stop and reset a clock wirelessy)
The second 40X2 receives the serial commands using a 2nd DORJI module and shows a countdown clock with mins, seconds and hundredths on an LCD Display.
How it works...
The remote transmits every ~350mSec a check byte ($55) and the button status (Button 1, 2 ,3 or null).
The receiver looks at the received button byte and starts, stops or resets the 30min countdown clock. (Countdown is performed within the interrupt routine)
When start is pressed the following command is performed to start the clock
setintflags %10000000,%10000000
When stop is pressed the following command is performed to stop the clock
setint off
All was going well until I discovered an issue involving the Timer and HSERIN command.
The Serial command I was originally using is this:
hserin [500,exittransmit],0,1,($55) 'Receive console button status
However I found that when I had the DORJI module plugged in, the countdown values would speed up (i.e. the serial reception was affecting the timer).
I thought the timeout value in the hserin command maybe be the problem so I changed the command to the following:
hserin 0,1,($55) 'Receive console button status
With the DORJI module plugged in the countdown values work.
However when I unplug the DORJI module, the timer does not generate an interrupt at all!
(I fear the serial module is generating the interrupts!).
Furthermore I also tried using background receive however it appears you cannot have two interrupt flags (toflag and hserflag) generating interrupts!
Is it possible that the timer and serial port are connected in some way?
Any thoughts on a solution to this would be most appreciated!
thanks