Page 1 of 1

SERBNG Command ????

Posted: Wed Dec 11, 2013 4:15 am
by Borje
Hi
I try to understand how the SERBNG command works,
I try to use the Command in the way it is descibed in the user manual (I think I do) to send a string on pin 30.
My intention is to output a short string to a serial display on pin 30...9600 baud (logical 3.3 V level output)

example:
pinmode 30, out
repeat
x=SERBNG(30,367,"testing")
until inkey >-1
'
Result is that the code is accepted but no output..... :(

Format (from user manual)
SERBNG(ercode)=SERBNG(<pin>,<speed>,<string>) :!:
I need help to understand the command.
Best regards
Borje

Re: SERBNG Command ????

Posted: Wed Dec 11, 2013 11:16 am
by Daniel
Hi Borje

It used to work; I'll look at it ASAP, maybe I broke it during one of the bug fixes. I noticed now that I don't have it as a test case that I run after a firmware fix so it may escape detection if a fix broke it. Most instructions are completely isolated from each other but a few depend on shared resources such as the background timer. The SERBNG is one such instruction.

More later today.
Daniel

Re: SERBNG Command ????

Posted: Wed Dec 11, 2013 9:50 pm
by Andries Pretorius
I also tested SERBNG with Borje's code. My results are the same as Borje's - no output.

Regards

Andries

Re: SERBNG Command ????

Posted: Thu Dec 12, 2013 11:35 am
by Daniel
I have duplicated the problem and am working on a fix. The problem is a bit subtle; For pin numbers below 30, the output appears on the next lower numbered pin. So if the output pin is chosen as 29, the data appears on pin 28 (if it is made an output pin). This is truly weird because internally I use the same code as used for the DOUT instruction to toggle the pin. In this instruction the wrong pin changes. Also, the problem changes behavior when I enable debug code generation in the compiler. This points to the compiler optimizer breaking otherwise good code or a subtle bug in my source code. Even stranger is that the code is entirely broken for pin numbers 30 and above.

This is top priority and should be fixed soon.

Daniel

Re: SERBNG Command ????

Posted: Sun Dec 15, 2013 5:05 pm
by Daniel
The problem with the SERBNG result also impacted the IND command for pin numbers greater than 30. IND was not reliable for pin numbers greater than 30. All these issues have been resolved. There is a new User Manual on the web site and anybody who needs the new firmware should contact me by email. Firmware with a revision number greater than 0.78 has the SERBNG problem resolved.

Daniel

Re: SERBNG Command ????

Posted: Mon Dec 16, 2013 2:27 am
by Borje
Thank you Daniel
Ver 0.78 installed and SERBNG verified for pin 25 to 30 to work flawless in 9600 baud. :D :D