Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - Serial control...

Serial control...

Postby Tschudin on Sat May 15, 2004 7:53 pm

I built a machine with a 68HC11 microcontroller. I want to run it from my Palm. If I use something like this...

seropen(9600,"8N1N",100);
sersend(2);
sersend(1);
serclose();

Will I be useing the beamming port, the cradle connection or both? I am hoping to just connect the cradle connection to the machine and send single bytes to communicate with the machine...
Tschudin
 
Posts: 2
Joined: Mon May 03, 2004 5:37 pm

Postby momchi on Sat Jun 12, 2004 3:50 pm

Yes, this should work fine.
I think that seopen() etc always refer to the serial port (somebody correct me please, if I'm wrong). I've used it for Palm-Palm communication via cable.

To use the IR port, I think, there is a special API/library/funcs.

A practical advice: unless you gonna have a "heavy" traffic it is a good idea to either:
a) use an event-driven open-trasmit-close
b) use sleep() in a transmission/receive loop to save on power
- serial port really drains your batteries!


Be happy!
Be happy!
momchi
 
Posts: 2
Joined: Sat Jun 12, 2004 3:02 pm
Location: USA

Postby otakribut1 on Tue Apr 19, 2005 1:55 am

you can send via infrared, if you are using palmos 4 and below. there are few apps for controlling lego which uses hc8/hc11 microprocessor. if you are using pc, you 'll have to beam via cradle--serial connection only. first---you need to set the serial connection. i'ven't manage to get it to work on my nec p300 pocketpc yet.
the qbasic code by bert van dam.
SUB LegoOpenCom

'This is the addres of Com 2, change this if you're using another port.
'com1=&H3F8 com2=&H2F8 com3=&H3E8 com4=&H2E8 com5=&H2F0 com6=&H3E0 com7=&H2E0 com8=&H260
'lpt1=&H378 lpt2=&H278 lpt3=&H3BC
Register = &H3F8

'Open the comport for random, disable all checks (otherwise some sort
'of handshaking protocol will start, and there's noting to shake hands
'with). Note the size of the buffers, you need lots of buffers to keep up.
OPEN "COM1:2400,N,8,1,CD0,CS0,DS0,OP0,RS,TB8192,RB8192" FOR RANDOM AS #1

'What we really want is Odd (but this can't be done in Basic) so
'change the Line Control Register accordingly (offset 3 to COM address)
OUT (Register + 3), &HB

'For the Cybermaster DTR line must be high (default) and RTS line must
'be low. So force RTS and DTR in the Modem Control Register (offset 4 to
'the COM address).
Temp = INP(Register + 4)
Temp = Temp OR 1 'DTR on
Temp = Temp AND NOT 2 'RTS off
OUT (Register + 4), Temp

END SUB
and then, you send opcodes to control your hc11.
otakribut1
 
Posts: 12
Joined: Tue Feb 22, 2005 2:26 am


Return to PocketC for Palm OS KB

Who is online

Users browsing this forum: No registered users and 1 guest