rs232 port

Discussion in 'The Projects Forum' started by fatwi, Jan 12, 2008.

  1. fatwi

    Thread Starter New Member

    Jan 12, 2008
    6
    0
    hi
    I am curretly working on a speed measurement system where i measure the speed of an encoder disc.

    i have designed the circuit to count the number of pulses generated by the disc.
    now i have to transmit this data to the computer using the RS232 serial port where the data will be stored in a database which is lnked to a VB interface.

    i dont knw a thing about the interfacing part..
    any idea how i shld proceed?


    thx in advance
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    First, I suggest that you consider using USB instead, as RS232 is a basically obsolete standard.

    Secondly, it would help a lot to see your circuit. Please post it in a .JPG or .PNG format, so it's easy to view without any custom software.
     
  3. eeboy

    Active Member

    Sep 27, 2007
    90
    1
    I agree with Wookie... hard to say much without seeing a circuit.

    However, I think it would be much easier to interface to RS232 (hardware and software). If you find yourself missing a RS232 interface on your target PC simply use a USB->RS232 dongle.
     
  4. fatwi

    Thread Starter New Member

    Jan 12, 2008
    6
    0
    here is my circuit
    View attachment circuit.doc

    sorry its a word doc

    i use the PISO shift register 74165 to obtain a serial output.

    what i need to know is now how can i input this data to the serial(RS232) port and interface the data with my pc..

    thx
     
  5. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    You have at least a couple of choices.

    One approach would be to add a UART to your design. In support of the UART you would need a 5V to RS-232 converter such as the ones made by MAXIM and other manufacturers. You would need to design a sequential logic circuit to implement a state machine that periodically transmitted the 8-bits of data in RS-232 to the PC.

    Another approach would involve using an AVR or PIC microcontroller together with the same MAXIM 5V to RS-232 converter. Both the AVR and the PIC contain internal UARTs which would allow you to use software to read the data and transmit it periodically.

    Neither of these two approaches are trivial. I myself would favor the microcontroller approach.

    hgmjr
     
  6. fatwi

    Thread Starter New Member

    Jan 12, 2008
    6
    0
    any idea how to work out the first option?

    do i really need to used a UART?
    can't i just connect a clock with same baud rate ad serial port of PC to the shift register to transmit the bits?
    and then connect the serial output of shift register to one end of the serial port?

    im really stuck and running out of time..

    does anyone knw where i can get a circuit that really works...


    thx
     
  7. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    You can do it with shift registers together with a MAXIM 5V to 232 converter.

    Are you comfortable with sequential logic design?

    hgmjr
     
  8. fatwi

    Thread Starter New Member

    Jan 12, 2008
    6
    0
    I just have to connect the shift register in the circuit(posted previously) to
    the MAXIN 5V and connect the output of the MAXIM 5v to the RS232 port.

    am i getting it right?

    what clock frequency do iuse for the shift register?

    can someone please post a schematic/circuit diagram?

    thx in advance
     
  9. fatwi

    Thread Starter New Member

    Jan 12, 2008
    6
    0
    Any idea how to proceed with the microcontroller?

    what type should i use?

    thx
     
  10. cumesoftware

    Senior Member

    Apr 27, 2007
    1,330
    10
    Isn't USB a far more complex standard than RS232. There is a lot of protocol involved.
     
Loading...