Jump to content
IGNORED

Sending binary data to com1


sjt

Recommended Posts

Xbasic programmers out there.

Is there an easy way using xbasic to send a binary string to the com 1 port, string len 40 bits.

Can it be sent using open rs232 and print port commands? Data such as "1010101....." etc

I need to send a 40bit bin string and there is no POKE in xbasic correct?, to directly access the com port at h3fC (com1)

 

Steve

Link to comment
Share on other sites

Perhaps not the easiest method, but you can build 5-byte (40-bit) strings by concatenating byte values as "characters" in the following manner:

100 A$ = ""
110 DATA 0,255,157,0,99
120 FOR I=1 TO 5
130 READ A
140 A$=A$ & CHR$(A)
150 NEXT I

You should then be able to send that string to the RS232 device.

 

...lee

 

  • Like 2
Link to comment
Share on other sites

The 40bit string I was referring to would be used to control a X10 rs232 wireless interface. I did see some mention of this in some old messages.

I couldn't find any messages indicating that there was success in communicating with it using the TI

 

I thought about using the method Lee suggests, I tried using the win99 emulator but I don't think I can access the rs232 com 1 port that way. (on the pc)

 

Has anyone had success with communication with what is commonly called the x10 wireless firecracker using the TI.

It uses a 16bit header+ 16bit of control data + an 8bit footer

 

It's pretty easy to communicate with it using qbasic on the pc. ( that's where the com port info came from)

 

The Header is 11010101 10101010

The data for (house code A1) is 01100000 000000000

The Footer is 10101101

 

These strings combined together (40 bits) form the complete command to activate the wireless receiver on the channel indicated.

 

The above would turn on any X10 device on house code A1 or those connected to the wireless x10 receiver directly.

 

I'll have to try it on the real (TI) hardware. I think i have a RS232 tester somewhere I can put in line (leds showing communication)

 

 

If Xbasic doesn't work, using "call load" how would you directly access the rs232 port on the TI? Wouldn't you have to turn on the DSR for that card?

 

Somewhere someone mentioned something about using the joystick port?

 

Steve

Edited by sjt
Link to comment
Share on other sites

There were two programs for controlling older style X-10 interfaces with the TI. One used a cartridge and a cable connected to the joystick port (from CorComp). The other used a disk and the RS-232 (I don't have that one, but I do have the manual for it). Ohm was trying to interface a Firecracker sometime last year, but I'm not sure if he got anywhere with it.

Link to comment
Share on other sites

That was me, not Ohm, he just asked for me. ;)

 

The Firecracker connects to the RS232 port but it does NOT use serial data - so I don't know whether that is what SJT is trying to use. The Firecracker uses the flow control lines in order to act as a pass through serial device. We attempted to hook it up to my CF7 (I forget which is which, but I have the one with the parallel port) and I was trying to bitbang the interface through that, but I had no luck. I also wrote code that should have worked on the serial device that Ohm has, but he reported no success either. The final fallback was I was going to drop one of my GROMs into an XB cart and ship that to him to play with, since there's every reason that should work, but unfortunately that project fell off my plate and isn't likely to come back.

Link to comment
Share on other sites

Hi Tursi,

Yes, that is what I was playing with. I got a firecracker interface and wireless receiver for under $15

It should work on the TI.

The serial data is needed to address the wireless receiver. So you do have to send serial data.

My understanding is the serial data acts like a key when sent in specific sequence altering the DTR AND RTS lines and is recognized by the wireless receiver. The data is very specific that needs to be sent to create the proper key. There is a header and a footer which don't change and then a 16bit sequence that changes based on the device to address, and if on or off or dim etc.

 

I have a PC basic program which works perfectly.

 

Steve

  • Like 1
Link to comment
Share on other sites

 

I have a PC basic program which works perfectly.

 

 

Hey Steve,

Would you mind sharing that program? I'd love to take a look at it when I have time. Maybe I'll finally have some success.

 

Back when I was working with this I had a Nano PEB, unfortunately I too had ZERO success, which I'm sure is due to the Nano.

 

The attached .DSK image is what I received from Tursi, it's a GREAT set of CALLS and even has an Uber Cool TSR clock that stays in memory.

 

It's not setup for my TI-PEB, so I've not not been able to revisit the project. Also, I only have one available open comport now (COM4). So whatever I do, it would have to be compatible with that port.

 

I bought an extra XB module for the next step which would have been to mount the Firecracker in it for testing, which would have been Bad Azz, but I had other things going that sidetracked me and I never got back to the project.

X10-TI-Firecracker.zip

Link to comment
Share on other sites

I'm going to attach the package I did for Ohm back in the day, and maybe someone who has the CF device with a serial port can take a peek and see why it doesn't work. (I was musing tonight that maybe I just have the polarity of the bits inverted).

 

The included zip has full source, binaries, and sample application for an XB interface to the Firecracker (except, of course, it didn't seem to work! I knew why my tests with the CF7 parallel port version didn't work, but can't troubleshoot the other).

 

(Still attaching this even though Ohm included the old DSK image, because I think the rest of the package has value to be out there).

 

x10.zip

 

If anyone gets it working, all I ask is a credit in the final product.

Edited by Tursi
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...