Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/06/02 12:28
Read: times


 
#19465 - RE: The code is crashing :(
"Actually the data is coming off an encoder which encodes with pulse width modulation.
In the idle state the pulse is constantly low so as the pulse goes high the input port the software starts measuring the pulse widths according to the data sheet of the encoder chip."
You do not state, but if indeed it is PWM, ther must be a timer involved. If so, is your problem the interrupt when the timer overflows. ALWAYS, REGARDLESS OF DISABLES AND WHATEVER put RETI in ALL interrupt slots (3h, 0bh ....)

"The difference between good and bad data is exactly the same way as you mentioned that the received byte is different from the expected byte. "
This is what lead me to the above guess.

"The expected byte is read from the look up table."
I take you mean 'usedd ad index into a lookup table'

"Hey, its the first time I am effectively using lookup table in my code. Can it be a reason that the address offset is tooooo big that it never returns."
Two comments. You say expected BYTE i.e. the lookup table should have 256 entries. If you have 256 entries there can not be an address too big (if you stay within the program memory you have.

"I don't think it can happen cuz, whether data bad or good the address offset is always constant and stored in a register and used by (mov a @a+pc)......."

HOW do you access 256 bytes off the PC, that is impossible use movc @a+dptr

Erik

List of 18 messages in thread
TopicAuthorDate
The code is crashing :(            01/01/70 00:00      
RE: The code is crashing :(            01/01/70 00:00      
RE: The code is crashing :(            01/01/70 00:00      
RE: The code is crashing :(            01/01/70 00:00      
RE: The code is crashing :(            01/01/70 00:00      
RE: The code is crashing :(            01/01/70 00:00      
RE: The code is crashing, Erik.            01/01/70 00:00      
RE: The code is crashing, Craig:            01/01/70 00:00      
RE: The code is crashing, Craig:            01/01/70 00:00      
RE: See the mail Craig:            01/01/70 00:00      
RE: See the mail Craig:            01/01/70 00:00      
RE: The code is crashing, Craig:            01/01/70 00:00      
RE: I buy your idea, Andy:            01/01/70 00:00      
RE: Sorry Craig.            01/01/70 00:00      
Crashing            01/01/70 00:00      
RE: The code is crashing :(            01/01/70 00:00      
RE: Hang on:            01/01/70 00:00      
RE: The code is no more crashing :)            01/01/70 00:00      

Back to Subject List