Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Ads

Discussion Groups

Discussion Groups | BasicX | multiple serial outs using com3.

Discussion forum for the BasicX family of microcontroller chips.

Re: multiple serial outs using com3. - Author Unknown - Apr 1 8:09:00 2002

I've used COM3 on several ports at run time. I have to open it,
use it, then close it and move on to the next pin. No problems for
me as I use the Hardware UART for permanent comm and all my other
COMs are just to send instructions out to slave processors.

DLC
--
--------------------------------
Dennis Clark
http://www.techtoystoday.com
-------------------------------- <tt>
Hello all,<BR>
<BR>
Has anyone used com3 to talk to more than one serial device on <BR>
different pins during run-time?<BR>
<BR>
For example: You have four devices out there and you have different <BR>
serial requirements for each one. Can you reconfigure com3 using <BR>
OpenCom3() on the fly using different paramaters? Or, once OpenCom3() <BR>
is used, are all other calls to OpenCom3() ignored?<BR>
<BR>
I saw no documentation on it, except that there is no Close(anything) <BR>
anywhere.<BR>
<BR>
If com3 truly can I/O on only one pair of pins, I can think of <BR>
several messy (hardware) ways around this, but is there a good (i.e. <BR>
easy) way to do this?<BR>
<BR>
Thanx for your input().<BR>
Daren Hatch<BR>
<BR>
</tt>

<br>

<!-- |**|begin egp html banner|**| -->

<table border=0 cellspacing=0 cellpadding=2>
<tr bgcolor=#FFFFCC>
<td align=center><font size="-1" color=#003399><b>Yahoo! Groups
Sponsor</b></font></td>
</tr>
<tr bgcolor=#FFFFFF>
<td align=center width=470><table border=0 cellpadding=0 cellspacing=0><tr><td
align=center><font face=arial size=-2>ADVERTISEMENT</font><br><a
href="http://rd.yahoo.com/M=215002.1954253.3462811.1261774/D=egroupweb/S=1706554
205:HM/A=1000239/R=0/*http://ads.x10.com/?bHlhaG9vaG0xLmRhd=1017688930%3eM=21500
2.1954253.3462811.1261774/D=egroupweb/S=1706554205:HM/A=1000239/R=1"
target=_top><img
src="http://ads.x10.com/?Z3lhaG9vaG0xLmRhd=1017688930%3eM=215002.1954253.3462811
.1261774/D=egroupweb/S=1706554205:HM/A=1000239/R=2" alt="" width="300"
height="250" border="0"></a></td></tr></table></td>
</tr>
<tr><td><img alt="" width=1 height=1
src="http://us.adserver.yahoo.com/l?M=215002.1954253.3462811.1261774/D=egroupmai
l/S=1706554205:HM/A=1000239/rand=956925560"></td></tr>
</table>

<!-- |**|end egp html banner|**| --
<br>
<tt>">Yahoo! Terms of Service</a>.</tt>
</br




(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )


multiple serial outs using com3. - darenhatch - Apr 1 14:21:00 2002

Hello all,

Has anyone used com3 to talk to more than one serial device on
different pins during run-time?

For example: You have four devices out there and you have different
serial requirements for each one. Can you reconfigure com3 using
OpenCom3() on the fly using different paramaters? Or, once OpenCom3()
is used, are all other calls to OpenCom3() ignored?

I saw no documentation on it, except that there is no Close(anything)
anywhere.

If com3 truly can I/O on only one pair of pins, I can think of
several messy (hardware) ways around this, but is there a good (i.e.
easy) way to do this?

Thanx for your input().
Daren Hatch





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: multiple serial outs using com3. - Neil Jepsen - Apr 1 15:36:00 2002

Yes Daren. I have onb several occassions, used 3 serial LCDs and a
serial radio modem ( at a different baud rate) on the same BX24 without
any problems. Just reconfigure the com3 as required. Make sure you sort
out the incoming and outgoing buffers correctly. For instance if you
declare a buffer of one length and open it longer
darenhatch wrote:

> Hello all,
>
> Has anyone used com3 to talk to more than one serial device on
> different pins during run-time?
>
> For example: You have four devices out there and you have different
> serial requirements for each one. Can you reconfigure com3 using
> OpenCom3() on the fly using different paramaters? Or, once OpenCom3()
> is used, are all other calls to OpenCom3() ignored?
>
> I saw no documentation on it, except that there is no Close(anything)
> anywhere.
>
> If com3 truly can I/O on only one pair of pins, I can think of
> several messy (hardware) ways around this, but is there a good (i.e.
> easy) way to do this?
>
> Thanx for your input().
> Daren Hatch > Yahoo! Groups Sponsor
ADVERTISEMENT >
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

, problems will occur!!
neil

darenhatch wrote:

> Hello all,
>
> Has anyone used com3 to talk to more than one serial device on
> different pins during run-time?
>
> For example: You have four devices out there and you have different
> serial requirements for each one. Can you reconfigure com3 using
> OpenCom3() on the fly using different paramaters? Or, once OpenCom3()
> is used, are all other calls to OpenCom3() ignored?
>
> I saw no documentation on it, except that there is no Close(anything)
> anywhere.
>
> If com3 truly can I/O on only one pair of pins, I can think of
> several messy (hardware) ways around this, but is there a good (i.e.
> easy) way to do this?
>
> Thanx for your input().
> Daren Hatch > Yahoo! Groups Sponsor
ADVERTISEMENT >
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [Non-text portions of this message have been removed]




(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

RE: multiple serial outs using com3. - James R. Parish - Apr 1 17:35:00 2002

This is in my MAIN:
PUBLIC INBUF(1 To 48) as BYTE 'Serial data in buffer
PUBLIC OUTBUF(1 To 32) as BYTE 'Serial data out buffer
And I call when needed on-the-fly:

'Opens the Serial Port for use on selected PINS.
'8N1
'CALL SetupSerialPort(PORT,BAUD)
'PORT = 1 for PIN(5)-INPUT & PIN(6)-OUTPUT
'PORT = 2 for PIN(7)-INPUT & PIN(8)-OUTPUT
'PORT = 3 for LCD OUTPUT on PIN(10)
'PORT = 4 for Printer Output on PIN(9)

PUBLIC SUB SetupSerialPort(ByVAL PORTSET as BYTE, ByVAL BAUD as LONG)
SELECT CASE PORTSET
CASE 1
CALL PUTPIN(5,bxInputTristate)
CALL PUTPIN(6,bxOutputHigh)
CALL OpenQueue(InBuf,48) 'Needs 48 min to run
CALL OpenQueue(OutBuf,32)
CALL DefineCom3(5,6,bx0000_1000)
CALL OpenCom(3, BAUD, InBuf, OutBuf)
CASE 2
CALL PUTPIN(7,bxInputTristate)
CALL PUTPIN(8,bxOutputHigh)
CALL OpenQueue(InBuf,48)
CALL OpenQueue(OutBuf,32)
CALL DefineCom3(7,8,bx0000_1000)
CALL OpenCom(3, BAUD, InBuf, OutBuf)
CASE 3
CALL PUTPIN(10,bxOutputLow) 'LCD output PIN
CALL OpenQueue(INBUF,0) 'no data in
CALL OpenQueue(OUTBUF,32)
CALL DefineCom3(0,10,bx1000_1000)
CALL OpenCom(3, BAUD, InBuf, OutBuf)
CASE 4
CALL PUTPIN(9,bxOutPutLow) 'Printer Port output PIN
CALL OpenQueue(INBUF,0)
CALL OpenQueue(OUTBUF,32)
CALL DefineCom3(0,9,bx1000_0111)
CALL OpenCom(3, 600, InBuf, OutBuf)
END SELECT

ENDSUB:
END sub

-----Original Message-----
From: darenhatch [mailto:]
Sent: Monday, April 01, 2002 2:22 PM
To:
Subject: [BasicX] multiple serial outs using com3.

Hello all,

Has anyone used com3 to talk to more than one serial device on
different pins during run-time?

For example: You have four devices out there and you have different
serial requirements for each one. Can you reconfigure com3 using
OpenCom3() on the fly using different paramaters? Or, once OpenCom3()
is used, are all other calls to OpenCom3() ignored?

I saw no documentation on it, except that there is no Close(anything)
anywhere.

If com3 truly can I/O on only one pair of pins, I can think of
several messy (hardware) ways around this, but is there a good (i.e.
easy) way to do this?

Thanx for your input().
Daren Hatch





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: multiple serial outs using com3. - darenhatch - Apr 2 8:54:00 2002

Hello again.

Thank you all very much for the info. Really appreciate it. Your code
clarify things a lot. You guys be da best!

Daren Hatch

--- In basicx@y..., "James R. Parish" <wiz@a...> wrote:
> This is in my MAIN:
> PUBLIC INBUF(1 To 48) as BYTE 'Serial data in buffer
> PUBLIC OUTBUF(1 To 32) as BYTE 'Serial data out buffer >
> And I call when needed on-the-fly:
>
> 'Opens the Serial Port for use on selected PINS.
> '8N1
> 'CALL SetupSerialPort(PORT,BAUD)
> 'PORT = 1 for PIN(5)-INPUT & PIN(6)-OUTPUT
> 'PORT = 2 for PIN(7)-INPUT & PIN(8)-OUTPUT
> 'PORT = 3 for LCD OUTPUT on PIN(10)
> 'PORT = 4 for Printer Output on PIN(9)
>
> PUBLIC SUB SetupSerialPort(ByVAL PORTSET as BYTE, ByVAL BAUD as
LONG)
> SELECT CASE PORTSET
> CASE 1
> CALL PUTPIN(5,bxInputTristate)
> CALL PUTPIN(6,bxOutputHigh)
> CALL OpenQueue(InBuf,48) 'Needs 48 min to run
> CALL OpenQueue(OutBuf,32)
> CALL DefineCom3(5,6,bx0000_1000)
> CALL OpenCom(3, BAUD, InBuf, OutBuf)
> CASE 2
> CALL PUTPIN(7,bxInputTristate)
> CALL PUTPIN(8,bxOutputHigh)
> CALL OpenQueue(InBuf,48)
> CALL OpenQueue(OutBuf,32)
> CALL DefineCom3(7,8,bx0000_1000)
> CALL OpenCom(3, BAUD, InBuf, OutBuf)
> CASE 3
> CALL PUTPIN(10,bxOutputLow) 'LCD output PIN
> CALL OpenQueue(INBUF,0) 'no data in
> CALL OpenQueue(OUTBUF,32)
> CALL DefineCom3(0,10,bx1000_1000)
> CALL OpenCom(3, BAUD, InBuf, OutBuf)
> CASE 4
> CALL PUTPIN(9,bxOutPutLow) 'Printer Port output PIN
> CALL OpenQueue(INBUF,0)
> CALL OpenQueue(OUTBUF,32)
> CALL DefineCom3(0,9,bx1000_0111)
> CALL OpenCom(3, 600, InBuf, OutBuf)
> END SELECT
>
> ENDSUB:
> END sub
>
> -----Original Message-----
> From: darenhatch [mailto:darenhatch@y...]
> Sent: Monday, April 01, 2002 2:22 PM
> To: basicx@y...
> Subject: [BasicX] multiple serial outs using com3.
>
> Hello all,
>
> Has anyone used com3 to talk to more than one serial device on
> different pins during run-time?
>
> For example: You have four devices out there and you have different
> serial requirements for each one. Can you reconfigure com3 using
> OpenCom3() on the fly using different paramaters? Or, once OpenCom3
()
> is used, are all other calls to OpenCom3() ignored?
>
> I saw no documentation on it, except that there is no Close
(anything)
> anywhere.
>
> If com3 truly can I/O on only one pair of pins, I can think of
> several messy (hardware) ways around this, but is there a good
(i.e.
> easy) way to do this?
>
> Thanx for your input().
> Daren Hatch




(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )