Hi guys,
I am using the BB2 with Basic Atom Pro 28.
On the PC side a Vaio VGN-UX92S (small one) with a USB to Serial connection.
I can program the BB2 without any problems so the cable seems to be ok.
However when I try something as simple as the code below I get some strange results.
I tried different settings on the USB/COM port (change in packet size, latency etc…) but nothing is fixing the issue.
So using the code below, when opening the Terminal 1 in the IDE, you need to select 19.2Kbs to try it.
[code];The compiler will ignore any commands
;or text after a ; or ’
msg var byte
i var word
start
;this will sound 3 ascending beeps
sound 9,[150\2500, 150\3000, 150\3500]
loophere:
for i = 0 to 500
serin s_in,i19200,100,nextStep,[msg]
goto checkMsg
nextStep:
next
nextStep2:
pause 100
;repeat
goto loophere
checkMsg:
msg = msg + 1
serout s_out,i19200,[HEX msg,13]
goto nextStep2[/code]
Normally when you press a key in the output window it will be sent to the BB2 and the BB2 should return the HEX value + 1.
It works sometimes, but sometimes I get unrelated values appearing in the window.
Any idea what could be going on?
If I can get relialable COM with my PC I wonder how I will be able to control my 4WD
Of course ideally I want an interupt based system but if I have already difficulties with the basic serin, then I can’t imagine with the interupt
Laurent.