Recent activity
Subscribe to this feed
Wolftec replied on May 13, 2008 17:26 to the discussion "IrDA on EM1000 or other Tibbo devices" in Tibbo:
I've never worked with Irda, so my options are only common sense.
I would use external logic to do this.
First connect a encoder/decoder chip to a serial port of the em1000 then connect a optical module to the chip.
You can use microchip MCP2150 or MPC2140 if your going to need IRDA compatibility, to connect to a pc or pda.
Use MCP2120, or MCP2122 if you just need to link to embebbed aplications that can use the same encoder/decoder.
Afterwards, Just connect it to a Sharp, Vishay, or Agilent Optical Module, and send and receive your data thru the serial port on the Em1000 just like any other application.
Hope it has helped you.
tibbo_the_cute started a conversation in Tibbo on May 08, 2008 07:01:
IrDA on EM1000 or other Tibbo devicesHi,
Anyone experience about IrDA on EM1000 or other Tibbo devices?
Kind Regards
Ali
A comment on the question "4-port serial-to-ethernet app. code for EM1000" in Tibbo:
Cool! I agree with your approach, sounds like a good idea. – ezuk, on April 09, 2008 11:05
ezuk marked one of tibbo_the_cute's replies in Tibbo as useful. tibbo_the_cute replied to the question "4-port serial-to-ethernet app. code for EM1000".
ezuk marked one of tibbo_the_cute's replies in Tibbo as useful. tibbo_the_cute replied to the question "POE on RJ1202?".
T-bone replied on April 09, 2008 06:21 to the question "POE on RJ1202?" in Tibbo:
Just some note, the RJ1202 is actually PoE capable. It has the required pin spaces on the back, just need some additional components to be soldered on. I believe you can order this special form of RJ1202. Just that, you will still need to have additional power regulation between the RJ1202 and the module.
tibbo_the_cute replied on April 08, 2008 12:33 to the question "POE on RJ1202?" in Tibbo:
It is possible with custom design with an other approach (without customization on EM1000). What you should do is:
1) You need PSE (Power sourcing equipment). It is a must.
2) You have to design another PCB (may be a daughter board)
with 2 Ethernet ports (thus L2 Ethernet switch. one for carrying data+power from PSE, the other one for data only for EM1000) and a power header connector, and a cable that suit both header and power jack on EM1000.
3) With careful design, L2 Ethernet switch - T1000 connection can be done without transformers. However, in this case, you may not use auto-negotiation (forced 100Mbps), MDI-X functions, forced full-duplex...
tibbo_the_cute replied on April 08, 2008 12:01 to the question "4-port serial-to-ethernet app. code for EM1000" in Tibbo:
Right now I can distinguish which serial port(s) sending data. I am using the similar approach what I have done on sending data from ethernet to desired serial port, i.e. socket - serial port association.
I think it is not a good idea to "serial port number" string insertion or similar approach that I mentioned previously.
Regards
Ali
tibbo_the_cute replied on April 07, 2008 14:32 to the question "4-port serial-to-ethernet app. code for EM1000" in Tibbo:
Thank you Ezuk
I wrote code below..
sub on_ser_data_arrival
select case ser.num
case 0
sock.setdata(" " + "SERIAL PORT=0" + " ")
sock.setdata(ser.getdata(sock.txfree))
sock.send
case 1
sock.setdata(" " + "SERIAL PORT=1" + " ")
sock.setdata(ser.getdata(sock.txfree))
sock.send
case 2
' sock.setdata(" " + "SERIAL PORT=2" + " ")
sock.setdata(ser.getdata(sock.txfree))
sock.send
case 3
sock.setdata(" " + "SERIAL PORT=3" + " ")
sock.setdata(ser.getdata(sock.txfree))
sock.send
end select
end sub
I can get data with "serial port number". However,:
1) As the code indicates, "serial port number" string insertion occurs repeatedly on the Hyperterminal.This seems destroy payload data.
2) If I try sending data simultaneously from serial ports, one ports prints its serial port number as well as the other's. In this case the other's serial port number can not be printed on the port of the Hyperterminal.
Do you think, there is an other way to distinguish which serial port sending data by working on socket ports?
Kind Regards
Ali
ezuk replied on April 07, 2008 08:57 to the question "4-port serial-to-ethernet app. code for EM1000" in Tibbo:
tibbo_the_cute replied on April 07, 2008 08:11 to the question "4-port serial-to-ethernet app. code for EM1000" in Tibbo:
Hi Ezuk
Do you have an idea how to add a string (e.g "this data coming from serial port 0") at the beginning of the data coming to serial ports then to be sent thru ethernet.. In short, I would like to identify the data coming from serial portS, 0,1,2 or 3. Note that in our system, a PC is a host sending and collecting data thru EM1000. Distinguishing and sending to desired serial port on a desired EM1000 is OK. Plus, it is easy to distinguish which EM1000 is sending data thru ethernet as well. But the question is
how I can find a way to distinguish data on the same EM1000 sending from more than one serial ports to ethernet.
Kind Regards
Ali
ezuk replied on April 07, 2008 07:21 to the question "4-port serial-to-ethernet app. code for EM1000" in Tibbo:
tibbo_the_cute replied on April 07, 2008 06:34 to the question "4-port serial-to-ethernet app. code for EM1000" in Tibbo:
Hi Ezuk,
Thank you for your reply. Some kind of arbitration (between serial ports and ethernet) must be in the chip that will lead to some negligable delay. This is unavoidable. Our application data coming to serial ports then will be presented thru GUI.
Now I am trying to add a string (e.g "this data coming from serial port 0") at the beginning of the data coming to serial ports then to be sent thru ethernet..
One other question is can GPIOs be used to emulate standard SPI bus?
Kind Regards
Ali
ezuk replied on April 06, 2008 08:29 to the question "4-port serial-to-ethernet app. code for EM1000" in Tibbo:
tibbo_the_cute replied on April 03, 2008 12:13 to the question "4-port serial-to-ethernet app. code for EM1000" in Tibbo:
sum up:
1) Using COM and WINSOCK ports for Hyperterminals on two PCs.
2) INTENTION: 4 sockets, 4 serial ports with no flow control (com ports):
1000 <--> serial port0
1001 <--> serial port1
1002 <--> serial port2
1003 <--> serial port3
3) For Ether to rs-232 transmission flow direction: data can be sent to desired serial port(s) simultaneously.
1000 --> serial port0
1001 --> serial port1
1002 --> serial port2
1003 --> serial port3
4) For rs-232 to Ether transmission flow direction: only one serial port data can be sent to desired socket. Only one of the four sockets anytime. Latest socket to be opened will get the current data. Simultaneous RS-232 data can not occur. Second com port start to send data when one com port already have been sending data then previous data stream get stopped.
5) All these are tested on HYPERTEMINAL. Excuse me all, just to make sure, IS IT POSSIBLE TO SEND SIMULTANEOUS DATA FROM RS-232 PORTS TO ETHERNET??? I am trying to learn the answer of this question...
Kind Regards
Ali
Advisor replied on April 02, 2008 13:53 to the question "4-port serial-to-ethernet app. code for EM1000" in Tibbo:
tibbo_the_cute replied on April 02, 2008 12:17 to the question "4-port serial-to-ethernet app. code for EM1000" in Tibbo:
ezuk replied on April 02, 2008 11:17 to the question "4-port serial-to-ethernet app. code for EM1000" in Tibbo:
tibbo_the_cute replied on April 02, 2008 11:15 to the question "4-port serial-to-ethernet app. code for EM1000" in Tibbo:
Hi,
I can do exactly what I described in my first message:
I can sent data from a Hyperterminal. I open 4 Winsock ports e.g. 1000,1001,1002,1003. And I can send data from 1000 to serial port0, 1001 to serial port1, 1002 to serial port2, 1003 to serial port3. I can see this thru serial port LEDs. Besides this can be done simultaneously.
This the code. However I am not sure multiplexing serial data from 4 serialports on ethernet.
Include "Global.tbh"
public dim f as byte
sub on_sys_init
net.ip="194.27.102.77"
ser.num=0
ser.rxbuffrq(4) 'Needs to be adjusted
ser.txbuffrq(4) 'Needs to be adjusted
ser.num=1
ser.rxbuffrq(4) 'Needs to be adjusted
ser.txbuffrq(4) 'Needs to be adjusted
ser.num=2
ser.rxbuffrq(4) 'Needs to be adjusted
ser.txbuffrq(4) 'Needs to be adjusted
ser.num=3
ser.rxbuffrq(4) 'Needs to be adjusted
ser.txbuffrq(4) 'Needs to be adjusted
sock.num=0
sock.rxbuffrq(4) 'Needs to be adjusted
sock.txbuffrq(4) 'Needs to be adjusted
sock.num=1
sock.rxbuffrq(4) 'Needs to be adjusted
sock.txbuffrq(4) 'Needs to be adjusted
sock.num=2
sock.rxbuffrq(4) 'Needs to be adjusted
sock.txbuffrq(4) 'Needs to be adjusted
sock.num=3
sock.rxbuffrq(4) 'Needs to be adjusted
sock.txbuffrq(4) 'Needs to be adjusted
sys.buffalloc
for f=0 to 3
ser.num=f
ser.baudrate=ser.div9600/4 '38400
ser.flowcontrol=DISABLED
ser.enabled=YES
next f
sock.num=0
sock.protocol=PL_SOCK_PROTOCOL_TCP
sock.localportlist="1000"
sock.inconmode=PL_SOCK_INCONMODE_ANY_IP_ANY_PORT
sock.reconmode=PL_SOCK_RECONMODE_3
sock.num=1
sock.protocol=PL_SOCK_PROTOCOL_TCP
sock.localportlist="1001"
sock.inconmode=PL_SOCK_INCONMODE_ANY_IP_ANY_PORT
sock.reconmode=PL_SOCK_RECONMODE_3
sock.num=2
sock.protocol=PL_SOCK_PROTOCOL_TCP
sock.localportlist="1002"
sock.inconmode=PL_SOCK_INCONMODE_ANY_IP_ANY_PORT
sock.reconmode=PL_SOCK_RECONMODE_3
sock.num=3
sock.protocol=PL_SOCK_PROTOCOL_TCP
sock.localportlist="1003"
sock.inconmode=PL_SOCK_INCONMODE_ANY_IP_ANY_PORT
sock.reconmode=PL_SOCK_RECONMODE_3
end sub
'-------------------------------------------------------------
sub on_ser_data_arrival
' dim rxData0,rxData1,rxData2,rxData3 as string
' dim rxData as string
' for f=0 to 3
' ser.num=f
' rxData = ser.getdata(255)
' ser.setdata(rxData)
' ser.send
' next f
' select case ser.num
' case 0
' rxData0 = ser.getdata(255)
' ser.setdata(rxData0)
' ser.send
' case 1
' rxData1 = ser.getdata(255)
' ser.setdata(rxData1)
' ser.send
' case 2
' rxData2 = ser.getdata(255)
' ser.setdata(rxData2)
' ser.send
' case 3
' rxData3 = ser.getdata(255)
' ser.setdata(rxData3)
' ser.send
' end select
for f=0 to 3
ser.num=f
sock.setdata(ser.getdata(sock.txfree))
sock.send
next f
end sub
'------------------------------------------------------------
sub on_ser_data_sent 'event fired when condition preset by ser.notifysent is met
dim sData,s1 as string
dim datalen as byte
datalen = ser.txfree
' ser.num=0
for f=0 to 3
ser.num=f
if len(s1) > datalen then 'since the TX variable could have grown in length, we check again to see if the TX buffer have enough free space
sData = left(s1,datalen)
s1 = right(s1,len(s1)-datalen)
ser.notifysent(ser.txbuffsize-len(s1)) 'if TX buffer does not have enough space, place data transfer on queue
else
sData = s1
s1 = "" 'flush the TX variable
end if
ser.setdata(sData) 'set the data
ser.send 'send the data
next f
end sub
'------------------------------------------------------------
sub on_sock_data_arrival
' dim sCheck as string(1)
dim sData as string
' sCheck=sock.getdata(1)
sData=sock.getdata(1)
select case sock.num
case 0
sock.localportlist="1000"
ser.num=0
ser.setdata(sData)
ser.send
sock.setdata(sData)
sock.send
case 1
sock.localportlist="1001"
ser.num=1
ser.setdata(sData)
ser.send
sock.setdata(sData)
sock.send
case 2
sock.localportlist="1002"
ser.num=2
ser.setdata(sData)
ser.send
sock.setdata(sData)
sock.send
case 3
sock.localportlist="1003"
ser.num=3
ser.setdata(sData)
ser.send
sock.setdata(sData)
sock.send
end select
end sub
'------------------------------------------------------------
sub on_sock_data_sent 'event fired when condition preset by sock.notifysent is met
dim sData as string
' sock.setdata(chr(10)+chr(13)+"***"+chr(10)+chr(13)) 'Indicates that there were data lost due to sock's TX buffer being full.
sock.setdata(sData)
sock.send
end sub
ezuk replied on April 02, 2008 11:06 to the question "4-port serial-to-ethernet app. code for EM1000" in Tibbo:
Wait, I'm not so sure that this is impossible. I'm no Tibbo BASIC wizard, but just look at this topic:
http://docs.tibbo.com/taiko/sock_sel.htm
It describes how a socket is invoked when data comes in (I mean, even if you have multiple sockets, one gets invoked as soon as it receives data).
So... Why not create 4 sockets, one per port, and as each one is invoked, it will route data to the appropriate serial port? What fails when you try this?
(Again -- I'm not saying you're wrong, and I'm not official TIDE support. I'm just trying to help out by pointing at the existing docs.)
| next » « previous |
Loading Profile...

