This Forum is Dedicated For all The Object Oriented PIC Lovers .......... The concept behind OOPic is straight forward. Use preprogrammed multitasking Objects from a library of highly optimized Objects to do all the work of interacting with the hardware. Then write small scripts in Basic, C, or Java syntax styles to control the Objects. During operation, the Objects run continuously and simultaneously in the background while the scripts run in the foreground telling the objects what to do.

Thursday, September 13, 2007

[oopic] Re: Roboteq motor controller.

--- In oopic@yahoogroups.com, "topservice77"
<alessandro.cofanelli@...> wrote:
>
> I have a roboteq motor controller i want to use with an OOPIC board.
> The only allowed way to control the roboteq is via serial port
> configured at 9600 baud, 7 bit, even parity, 1 bit stop. How can i set
> the oopic to use this configuration for serial communication? I tried
> with oSerialPort, oSerialH and oSerialLow but i'm unable to set the 7-
> bit, even parity and 1 stop bit. I'm able only to set baud rate.
> Moreover, can i use I/O lines different from 22 and 23 to control the
> roboteq hardware? (i have 2 controllers, so i need two serial ports)
>
> can someone help me????
>
> Thank you
>

Too bad about the even parity. You can take the lower 7 bits of the
character to be sent, figure out the parity bit and tack it on the end
to form an 8 bit character. Doing so, with the OOPic, will be time
consuming and difficult. I guess you could precompute each possible
character somehow.

If I really had to do this, I would use a CPLD. It would have 8
bidirection IOLines connected to bidirectional lines of the OOPic and
a couple of control signals: one to latch the current input from the
OOPic output (7 bit char) and another to enable the output from the
CPLD to the OOPic (to read the 8 bit char). A Xilinx XC9536 would be
my first choice.

Don't worry about the stop bit. It only wants one, it will accept more.

You can use oSerialL as a bit-banged serial port on any IOLine. You
still have to shift to RS232 levels to be equivalent to the PC.

I see three choices:

1) use a different motor controller
2) use a different microcontroller
3) learn how to code and program CPLDs.

It's interesting that the underlying PIC won't do 7 bit + parity
either in that it won't form the parity bit. The Atmel ATmega128
will... I would bet that is common across the AVR line of chips.

Richard



Yahoo! Groups Links

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/oopic/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

http://groups.yahoo.com/group/oopic/join

(Yahoo! ID required)

<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/

No comments: