xport code, have example, confused though


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Feb 2005
    Location
    Toronto, Canada
    Posts
    46


    Did you find this post helpful? Yes | No

    Default

    haven't hooked it up yet, so currently running at 0v

    not sure how to run something at 3.3v is there something like a 7805?


    and still no idea what USART is so I guess I'll do some reading.

    xport defualt is 9600, but it can be brought down.

    I'm excited to try this thing out, but I'm waiting for a breadboard compatible breakout board before I try it, rather than rush in and break something my first try.

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


    Did you find this post helpful? Yes | No

    Default

    To run at 3.3 volt, yup you'll need a 3.3v voltage regulator. Now double check your specific datasheet to know if the PIC can run @3.3 volt without problem, case not, you may need to use a sort of level shifter between your PIC running @5volt and the Xport running @3.3v.

    USART is just another built-in PIC feature, listed in the datasheet. You will need to use HSERIN/HSEROUT + some DEFINEs all listed in the PBP manual.

    with 4MHz you can run the internal USART to have a really decent/accurate 9600 bauds.
    Code:
    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
    DEFINE HSER_SPBRG 25  ' 9600 Baud @ 4MHz, 0.16%
    DEFINE HSER_CLROERR 1 ' Clear overflow automatically
    Steve

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

  3. #3
    Join Date
    Feb 2005
    Location
    Toronto, Canada
    Posts
    46


    Did you find this post helpful? Yes | No

    Default

    thanks everyone! I'm going to muck around with all of this now!

  4. #4
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    You can get a 3.3V regulator. I use an LM3940
    You obviously haven't read section 12 of the 16F628 datasheet - where it describes the USART!
    There is no need to run the XPORT at a speed slower than 9600 baud.
    Charles Linquist

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. Re-Writing IF-THEN-AND-ENDIF code?
    By jessey in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th August 2006, 17:23

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