BS2 serout output is off
MichelleJ
Posts: 2
I've been working on a project that takes a 10-button input and outputs a value corresponding to a particular button. The BS2 program continuously samples the voltage input from 10 ADC0831 chips, each chip corresponding to a button. If a particular button is pressed, the program is supposed to output a decimal formatted number corresponding to a particular button (e.g. button 1 outputs "50", button 2 outputs "51", and so on) via a serial port.
This all works perfectly when connected to the hyperterminal. However, when I try to run this program to view the output through another program (either "Presentation" or "CIRC"), I get a very strange output. While all the button presses are clearly detected, I find that the values that are outputted on the screen are not only different (they are off by 2, so for button 1 I get "48", for button 2 I get "49", and so on), but there is also an extra value that shows up on the screen that comes from seemingly nowhere. This value remains the same throughout the running of the program (in this case, I keep getting the number "53"). So, when a button is pressed, the number "53" shows up just before the value corresponding to the button that is being output. An example of the output goes as follows:
(button 1 pressed): 53 48
(button 2 pressed): 53 49
(button 5 pressed): 53 52
etc.
I've tried applying flow control to the serouts, but the program doesn't seem to want to run when this is done, and I'm not sure that that is the problem. Could this be another example of something being echoed, as I've read in previous forums. If this is the case, I don't know how to filter the output or parse to do as such. I've also connected all serial outputs to a high-speed oscilloscope and have found nothing extra that these chips are outputting.
Any help/guidance would be greatly appreciated - I've been working on this for wayyy too long...
This all works perfectly when connected to the hyperterminal. However, when I try to run this program to view the output through another program (either "Presentation" or "CIRC"), I get a very strange output. While all the button presses are clearly detected, I find that the values that are outputted on the screen are not only different (they are off by 2, so for button 1 I get "48", for button 2 I get "49", and so on), but there is also an extra value that shows up on the screen that comes from seemingly nowhere. This value remains the same throughout the running of the program (in this case, I keep getting the number "53"). So, when a button is pressed, the number "53" shows up just before the value corresponding to the button that is being output. An example of the output goes as follows:
(button 1 pressed): 53 48
(button 2 pressed): 53 49
(button 5 pressed): 53 52
etc.
I've tried applying flow control to the serouts, but the program doesn't seem to want to run when this is done, and I'm not sure that that is the problem. Could this be another example of something being echoed, as I've read in previous forums. If this is the case, I don't know how to filter the output or parse to do as such. I've also connected all serial outputs to a high-speed oscilloscope and have found nothing extra that these chips are outputting.
Any help/guidance would be greatly appreciated - I've been working on this for wayyy too long...
Comments
53 = 5· and 48 = 0 (50) which is right for button 1
53 = 5· and 49 =·1 (51) which is right for button 2
53 = 5· and·52 =·4 (54) which is right for button 5
Jeff T.