Serial com with internal oscillator


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Posts
    24

    Default Still Unclear

    Hi Mister-e
    Thanks for the reply.

    My question with the AUSART is. I have to us SHIFTIN and SHIFTOUT to talk to the AD7730 and Serout2 to send the result to another Pic.

    Can I use Shiftout with RB1/SDO, RB2/SDI and RB4/SCK and SEROUT or HSEROUT with RB5/TX?

    If I did this would the TXSTA register have to be changed between transmissions or would it be better to use another pin?

  2. #2
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373

    Default

    I have spent days collectively trying to work with async comms and no xtal. I can get lucky, but for a customer app. I would always revert to a crystal Why not use SPI for both. Use one pin to select your other PIC, and one to select your peripheral.Or, if the peripheral is looking for a low to select, set your outlying PIC as an enable high, and use the same pin. Just make sure both external units go into high impedance when deselected. I did this with a video on screen display. The PIC generating the overlay could only grab a little info between frames. I used shiftin and shiftout with very reliable results. Async can be unreliable even with a crystal in noisy environs, but makes it easy to hook up to a PC or GPS engine, etc...

    Ron

  3. #3
    Join Date
    Jun 2007
    Posts
    24

    Default Thanks

    Hi Ron,

    I think this will be the solution for me. I will have to use an extra pin to select the AD7730 but then I have 2 extras from not using an xtal. I can't see whether it is high impedance when not selected from the Datasheet but will check in a breadboard to see. I'll have to learn to use a pic as a slave in SPI but hopefully that won't be too tricky.

    Thankyou both for your help. I'd be stumbling around in the dark without it.

    Thanks,

    Mike

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    SPI or I2C, synchronous serial communication is really the way to go with an internal oscillator. If you're using SPI/I2C device, no harm to use the internal oscillator as it's a synchronous communication, but for RS232 asynch... this will cause you problem one day or another... unless you're really lucky!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Pic16f882 internal oscillator
    By offlander in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th October 2009, 20:15
  2. Internal oscillator please help
    By timbash in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 26th February 2009, 14:11
  3. PIC18F4620 Using the Internal Oscillator
    By kiwipiper in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd October 2007, 08:07
  4. How to use Internal Oscillator?
    By xobx in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 18th September 2007, 19:49
  5. PIC12F675, accuracy of baud rate with Internal Oscillator
    By Chris Mayhew in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 31st August 2005, 22:41

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts