Help...Touch screen with auto baud rate detection to SX28, 2 questions here

AndreaAndrea Posts: 17
edited 2011-02-17 - 16:13:12 in Microcontrollers
I have SX28 @20MHZ, baud rate "T115200" connected via serial to the BV4629 touch screen display and it is capable to determine auto baud rate by the first character received which MUST be a CR byte value 13.

My trays to establish communication was unsuccessful. The display presented the wrong baud rate value instead of the wanted one (115200). The seller-manufacturer suggested to me to do next:
"The logic is inverted, it should be +V when in the idle state, get your microcontroller to provide a non-inverted signal."

So I change "T115200" to "OT115200" and pull-up (4K7 resistor) line (sx TX_pin --> RX_pin on the display) but again, wrong baud rate values on the display.
Should I change the value of resistor? If so, how to calculate right one.
The only way I can control the display is "improvisation" as shown in attached SXB file.

The second problem for me is how to catch up incoming data(touched co-ordinates) without header byte.
More explanation in attached SXB file too.


SX28 Display
TX_pin ---> RX_pin
RX_pin <--- TX_pin
RC.6 <--- Int_pin

Thanks in advance.


  • ZootZoot Posts: 2,227
    edited 2011-02-16 - 18:32:01
    The basic parts of your program are probably OK, in my reading. However, in looking over the documentation for the device, it appears you either need to properly use the RTS line, or, at the least, you need to monitor that line (input on your SX) to see when it's busy "digesting" each character. Personally, if it were me, I would either properly implement RTS or I would use the I2C interface and jack the speed way up (using the SX/B I2CSPEED directive).

    You may also want to consider a 50mhz resonator/crystal for this project.

    Last but not least, if you are using a resonator, be sure you have the proper value resistor in place for the chosen resonator -- the resistor is generally connected across the OSC1 and OSC2 pins.

    Some details in your program --

    - since the idle state is high for the peripheral, set the TX pin to 1 at the end of your SEROUT subroutine, so it is always left in the idle state
    - check the documentation -- many of the commands to the peripheral send an "ack" back -- you must be sure that your SX/B program accepts this byte or performs some other logic to disregard the transmission from the peripheral or your program could hang or send garabage on the next TX out
  • ZootZoot Posts: 2,227
    edited 2011-02-16 - 18:34:55
    P.S. -- from the docs....
    274 x 164 - 27K
  • ZootZoot Posts: 2,227
    edited 2011-02-16 - 18:37:18
    You could just monitor RTS like this in your sub:
    RtsPin PIN RC.7 INPUT ' or whatever pin
      LOOP UNTIL RtsPin = 0 ' 0 = ready to accept data
      SEROUT TxPin, BRate, __PARAM1
  • AndreaAndrea Posts: 17
    edited 2011-02-17 - 15:55:48
    Zoot wrote: »
    - since the idle state is high for the peripheral, set the TX pin to 1 at the end of your SEROUT subroutine, so it is always left in the idle state.
    Yeah, thank you..this solved the first part of the problem. Now I can send commands via serial and device receive it with no problem. Checking the RTS solved the last part of the problem, now I'm able to get the data from the display (appears that the problem was in premature readings of the display).

    Now I'm curious, and I'll try the I2C (for the first time ever).

    Thank you
  • ZootZoot Posts: 2,227
    edited 2011-02-17 - 16:13:12
    Cool. Have fun!
Sign In or Register to comment.