Shop OBEX P1 Docs P2 Docs Learn Events
Serial Repeater — Parallax Forums

Serial Repeater

Mag748Mag748 Posts: 269
edited 2014-10-10 15:34 in Propeller 1
Hello,

I made this simple propeller object that may be of some use to some of you. From the description:

Serial Repeater for use with FullDuplexSerial Object

This object runs in its own cog and passes data back and forth between two
FDS ports. The purpose of which causes the propeller to appear transparent
when communicating to peripherals from a host computer. The data from
both the host and the peripheral is buffered in a queue that can be accessed
by the propeller at any time. Since this runs in a separate cog, the Prop
can function as it normally would to send data to the host and peripheral.

See attached object and DEMO. I am currently using this to play with the ESP8266.

Thanks,
Marcus

Example using the Parallax Serial Terminal:
Capture.PNG


Serial Repeater Demo - Archive [Date 2014.10.10 Time 13.53].zip

Comments

  • JonnyMacJonnyMac Posts: 9,186
    edited 2014-10-10 12:17
    I did something very similar the other day. I'm doing a project with a Noritake 24x6 Serial VFD and found a program on their web site that would send serial data to demonstrate features. The program conveniently provided all the raw hex codes as it demo'd the selected feature. I was able to test all the features of the VFD and updated my driver as I did it.
    pub main 
    
      vfd.start(13, 14, 15, 115_200)                                ' start vfd uart
      term.start(RX1, TX1, %0000, 115_200)                          ' start fds
    
      waitcnt(cnt + (MS_001 << 1))                                  ' let cogs start
    
      term.rxflush                                                  ' flush terminal buffer
    
      repeat
        vfd.tx(term.rx)                                             ' copy input from CUE to VFD
    
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-10-10 15:34
    Mag748 wrote: »
    Hello,

    I made this simple propeller object that may be of some use to some of you. From the description:

    Serial Repeater for use with FullDuplexSerial Object

    This object runs in its own cog and passes data back and forth between two
    FDS ports. The purpose of which causes the propeller to appear transparent
    when communicating to peripherals from a host computer. The data from
    both the host and the peripheral is buffered in a queue that can be accessed
    by the propeller at any time. Since this runs in a separate cog, the Prop
    can function as it normally would to send data to the host and peripheral.

    See attached object and DEMO. I am currently using this to play with the ESP8266.

    Thanks,
    Marcus

    Example using the Parallax Serial Terminal:
    Capture.PNG


    Serial Repeater Demo - Archive [Date 2014.10.10 Time 13.53].zip

    I have used a simple loop method which just echos one pin to another so it's not dependant upon baud rates etc. Even in Spin this will probably work fine but in PASM it's only a few lines of code.
Sign In or Register to comment.