serial communication problem

Discuss interfacing hardware with PocketC and OrbForms Designer

Postby nikolauzi on Thu Dec 08, 2005 7:00 pm

I'm developing an analysis tool for an intelligent actuator in a car (turbo charger adjustment). It's a single wire interface, what's sent will also be received by the PocketPC.
PocketC is working fine in graphic and sending 6byte commands, but receiving them directly by events leads to a problem, because serdata() shows me a received byte too much and waits a (too long) deadtime:(
Communication takes place in 50ms slices (should...).
I use writebyte (works, proved with oscilloscope) and sendbyte/serdata (not working:( ).
Has anybody a hint for me?
Would be great:)

The Nikolauzi
nikolauzi
 
Posts: 3
Joined: Tue Dec 06, 2005 6:51 pm

Postby nikolauzi on Fri Dec 09, 2005 9:44 am

I found out something amazing concerning my problem:
though I use readbyte, pocketc assumes that an incoming serial 0x00 shows the end of the message...:(
I guess that the serial buffer is not working correct...

Anybody has a workaround? I must read also zeros:(

The Nikolauzi
nikolauzi
 
Posts: 3
Joined: Tue Dec 06, 2005 6:51 pm

Postby nikolauzi on Sat Dec 10, 2005 1:23 pm

The solution is there:)
I found out that serdata and the com event is char orientated, i.e. 0x00 is a brake sign...
So I just poll the number of data I expect and use seropen with a timeout of 2ms...
Now it works:) But not with event...

The Nikolauzi
nikolauzi
 
Posts: 3
Joined: Tue Dec 06, 2005 6:51 pm


Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest

cron