Shop OBEX P1 Docs P2 Docs Learn Events
Using FullDuplexSerial with a single wire — Parallax Forums

Using FullDuplexSerial with a single wire

DiverBobDiverBob Posts: 1,108
edited 2008-12-26 15:47 in Propeller 1
I have coded a MCP12F683 (4 channel ADC - 8 pin chip) to send 4 channel ADC information to the uOled-96. So far it has been a one-way download only, with the ADC continously sending the data every 1 second, but due to the current draw I want to code a signal to start the ADC process and have the ADC in sleep mode while not needed. Before I dive into changing the code for this, is there any advice from someone who has tried this before (example code always appreciated - why re-invent the wheel)? I am tying the IO line to VCC via a 4.7K resistor and the line itself is going through a resistor prior to going into the prop, otherwise it is a direct connection between the two processors. On the 12F683 side I am programming it using PicBasic Pro and have been using the DEBUG command to transfer data at 2400 baud (I know, slow but speed isn't the issue here, power consumption is!). I plan on using the DEBUGIN command to read the output from the prop.

Thanks for any help

Bob Sweeney

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2008-12-26 10:42
    Hello Bob,

    you can use the fullduplexserial-object (FDS) with one wire
    you define the same pin for tx and rx and use mode 4

    the FDS has four modes of operation

    it is described in the sourcecode

    '' mode bit 0 = invert rx
    '' mode bit 1 = invert tx
    '' mode bit 2 = open-drain/source tx
    '' mode bit 3 = ignore tx echo on rx
    
    




    take a look into this thread

    http://forums.parallax.com/showthread.php?p=680429

    best regards

    Stefan

    Post Edited (StefanL38) : 12/26/2008 10:54:17 AM GMT
  • DiverBobDiverBob Posts: 1,108
    edited 2008-12-26 15:47
    Thanks for the info, I missed that topic when I was searching the forum. Unfortunately the search capabilities in this forum aren't the best. I was trying to see if I could use Simple_Serial so I didn't use another cog (mainly due to trying to minimize power usage since this will be battery powered, but it seems there may be no choice)

    I'll try this out later today and report back on my success (thinking positively!)

    Bob Sweeney
Sign In or Register to comment.