|
-
May 2nd, 2001, 12:46 PM
#1
Thread Starter
Hyperactive Member
RS232 Communication... On a bitwise level
Alright, a real challenge for VB
I know very little about using RS232 communication for anything other than just straight Rx Tx kinda communication....
I think that it has to have at least 4 output bits
is this right?
if so I need to manipulate the values of those.
I would need to send a sequence of...
1000
0100
0010
0001
Don't try to make sense of this, it is just to talk to hardware, and this is the sequence it needs to work. So this is basically what I need to do, I have a c++ program to do this through the parrell port, but it is very very slow, and I was wanting to take advantage of the higher baud rates that the RS232 hardware allows.
Nick
-
May 2nd, 2001, 02:39 PM
#2
Hyperactive Member
I don't think you can remove or manipulate the framing bits in the RS232 port, and still use the baud rate generator to automate the serial shifting. You may be able to bit-bang the individual control lines through code by directly accessing the control port bits for COMM1, but this would run at the same speed as bit-banging the parallel port.
If you really need the speed you will either need to strip out the framing bits electronically, or use the parallel port in combination with a shift register (74HC165) to maximize the throughput. You should be able to achieve 900K - 1.2M Bit data transfer rates with the parallel port set up like this, even in VB.
-
May 2nd, 2001, 02:44 PM
#3
Hyperactive Member
You mentioned that you had this setup using the parallel port? - that leads me to believe that you need a synchronous serial stream. RS232 is Asynchronous (No Clock), so I'm not sure how you would get it to work without a serial receiving engine (level converter - phase lock loop - baud rate generator - etc.) or microcontroller.
-
May 2nd, 2001, 04:33 PM
#4
Thread Starter
Hyperactive Member
okay thanx.
I think I am going to have to just do this with hardware.
:-(
just set up a system where I can set the speed with a varistor on a 555 chip to set a clock, then just have an incrementing chip.
and use the parrellel port to give the power to the chips.
Thanx again.
If you think of a better way, I would aprpeciate the comments.
-
May 2nd, 2001, 04:48 PM
#5
Hyperactive Member
if the device that you are trying to control excepts a clock line, an enable line, and a serial data line, then you could easily place use a high speed clock to run a shift register (74HC165) connected to the parallel port.
You would present a Byte of data to the parallel port, then trip one of the parallel port's output control lines (/Strobe, etc.) to trip the shift register to burst the serial data to the target hardware, then wait for more data. You could then:
Present Data To Port (&H01)
Trip Shift Register
Present Data To Port (&H02)
Trip Shift Register
Present Data To Port (&H04)
Trip Shift Register
Present Data To Port (&H08)
Trip Shift Register
Present Data To Port (&H01)
Trip Shift Register
etc.
The data rates would be very fast, and you would use the parallel port in parallel mode.
I could send you schematics to do this, if you're interested.
P.S. You may have problems using the parallel port to power the logic IC's, the parallel port is notoriously bad for this.
-
May 2nd, 2001, 05:08 PM
#6
Thread Starter
Hyperactive Member
Yeah that would be great!!
I would appreciate the schematics,
my e-mail is
[email protected]
or [email protected]
thanx techman!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|