Conflict when I use interrupt and RS232 component.

Forum for problems or queries regarding Flowcode Comms Components. Eg LIN, I2C, SPI, RS232, CAN, IrDA etc

Moderators: Benj, Mods

Post Reply
WalkOver
Posts: 65
Joined: Fri Nov 23, 2007 11:24 pm
Contact:

Conflict when I use interrupt and RS232 component.

Post by WalkOver »

Hello !

I have to drive two servo motor and receive 14 octet at 19200 bauds with the RS232 component. As soon as I receive data, the servo motor position change without any reason.

To drive my servo motor, I don't use your examples program. I use only one interruption (TIMER0) and I set RA0 for exemple. Then I put a delay ( delay_10us(FCV_POS_SERVO); ) and I clear RA0.

Is my problem comes from here ?

Other question : Is the RS232 component uses interruptions ? Maybe my problem comefrom here too. How can I receive data without disturbing my servo motor ?

Thank you for your help !

PS : I wait for the V4 very impatiently !!!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Conflict when I use interrupt and RS232 component.

Post by Benj »

Hello

It sounds like it could be something to do with your software delay. The RS232 is all hardware based and does not use interrupts as standard. Maybe Sean's servo example would work better as this is purely interrupt based and doesnt use any software delays. What value are you using for the RS232 receive timeout.

WalkOver
Posts: 65
Joined: Fri Nov 23, 2007 11:24 pm
Contact:

Re: Conflict when I use interrupt and RS232 component.

Post by WalkOver »

Thank you for your quick answer !

I try different value between 2 and 200 but I didn't see any change.

I will try to understand the Sean's example program and adapt this to mine.

Have a nice day :)

Post Reply