
Putt Putt
Canada
Asked
— Edited
Hi all and DJ,
I'm trying to figure out the syntax to mask the 8th bit of a packet serial command from EZ-B to RobotClaw Motor Controller, any help would be appreciated if it's possible on the EZ-B.
On other MCU's that I have I use this format...
Serout P15, i19200, [128, 0, 127 (255 & 0x7F) ]
Serout - well that's the command for output from the serial port,
in EZ-b that would be SendSerial.
P15 - is the port ...EZ-B D0
i19200 - is the baud rate...EZ-B just 19200 or whatever baud i use..
The 128, 0, 127, (255 & 0x7F) is "address, command, address, (checksum & 0x7F)
the 0x7F is the Hex code to mask the 8th bit.
Sooooo...
EZ-B code...
SendSerial ( D0, 19200, 128, 0, 127, (255 & 0x7F )
but it won't accept the "(255 & 0x7F)"
clear as mud eh!
:)
The code is for an Atom Pro 28 to RobotClaw , there must be a reason why it's done that way.
@DJ
I've setup the RobotClaw and EZ-B and all seems well so far THANKS, and thanks for putting up with my thick brain, I've been using Basic Atom pro for so long that I couldn't see how just the decimal number would work, it's never used that way for programing the Pro.
And now for another question...
This has probably been asked, can all the D ports be used for serial in and out?
And is there a command like "ReceiveSerial" or "GetSerial" etc.
There is no GetSerial. There are not enough free clock cycles to receive serial input during PID execution. Our new hardware guy is working on an EZ-Bit for that
Ok,
Why doesn't this line work with the variables
SendSerial (D0, 38400, 128, 6, "$L" , "$CS6" )
The variables work when using the print command but not in the line of code
Won't work.....error: not a valid format confused
Ah, fixed for the next release
ok, thanks again