16f628a usart


Closed Thread
Results 1 to 8 of 8

Thread: 16f628a usart

  1. #1
    Join Date
    Nov 2008
    Posts
    60

    Default 16f628a usart

    Hello everyone,

    does anyone have a working example using a 16f628a USART? I am trying to just send a byte and echo it back to the serial terminal. I am using a Easypic7. Thanks for any help.
    Regards
    CharlieM
    Using PBP3
    MCSPX

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: 16f628a usart

    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Nov 2008
    Posts
    60


    Did you find this post helpful? Yes | No

    Default Re: 16f628a usart

    Thanks for the reply Mackrat. I will try it,but I don't see how that will work for a 16F628a.
    Regards
    CharlieM
    Using PBP3
    MCSPX

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: 16f628a usart

    Quote Originally Posted by c_moore View Post
    Thanks for the reply Mackrat. I will try it,but I don't see how that will work for a 16F628a.
    Why would it not work? It is a demo on how to use the hardware serial port.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Nov 2008
    Posts
    60


    Did you find this post helpful? Yes | No

    Default Re: 16f628a usart

    Hi Mackrackit,

    Im using a 16f628a and it looks like the code is for a 16F877a or something because it uses port C 6 and 7 for rx and tx. anyway I got something working. it turns out that on a easypic7 when using a 16f pic I needed to use the 18B socket. so once I got the right socket everything started working. thanks.
    Regards
    CharlieM
    Using PBP3
    MCSPX

  6. #6
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default Re: 16f628a usart

    Look at the Datasheets. 16F877 uses C6 and C7 as you say, but the 16F628 used B1 RX and B2 TX

    the only thing that I can see needs changing from a quick glance is the line....

    TRISC = %10111111
    to
    TRISB = %11111011
    Keith

    www.diyha.co.uk
    www.kat5.tv

  7. #7
    aliciaDJones's Avatar
    aliciaDJones Guest


    Did you find this post helpful? Yes | No

    Default Re: 16f628a usart

    What is 16f628a usart ???

  8. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,596


    Did you find this post helpful? Yes | No

    Default Re: 16f628a usart

    Quote Originally Posted by aliciaDJones View Post
    What is 16f628a usart ???

    UNIVERSAL SYNCHRONOUS ASYNCHRONOUS RECEIVER TRANSMITTER (USART)

    RX=receive
    TX=transmit


    Look at Hserin/Hserout commands in PBP manual.


    Info on 16F628A can be found here:
    http://ww1.microchip.com/downloads/e...doc/40044f.pdf

    Robert
    Last edited by Demon; - 7th September 2012 at 06:21. Reason: added quote and link

Members who have read this thread : 1

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