7 bit ASCII to 16F877


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2008
    Posts
    3

    Default 7 bit ASCII to 16F877

    Hi

    I wrote a program to transmit & receive data from & to a PC and its working fine. It even displays the character I type on my keyboard on my LCD. Now I need to change the program to receive data from a serial instrument & display it on the LCD. Most of the data are displaying correctly but some show up as garbage. Can it be because the instrument uses a 7 bit ASCII protocol & how can I change my program to work with 7 bit data?

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

    Default

    Hardware or software?

    From the manual under SERIN2
    [quote]
    A DEFINE allows the use of data bits other than 8 (or 7 with parity).
    SER2_BITS data bits may range from 4 bits to 8 (the default if no
    DEFINE is specified). Enabling parity uses one of the number of bits...
    [quote]
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Nov 2008
    Posts
    3

    Default 7 bit ASCII to 16F877

    To mackrackit

    To what manual are you refering?
    The only manual I'm using are the PICmicro Mid-Range MCU Family Reference Manual & the PIC16F877 Data Sheet.

    I'm using USART on port RC6 & RC7 to transmit & Recieve.

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

    Default

    The Pic Basic Pro or Pic Basic manual.

    You are not using either one are you? Well that is the language we use here. What language are you using? Might be able to point you in the right direction.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Nov 2008
    Posts
    3

    Default

    To mackrackit

    I'm Using ASM

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

    Default

    Using ASM, this is the place for you
    http://www.piclist.com/techref/piclist/index.htm

    But I have to give a plug for basic
    http://www.melabs.com/
    They have a demo
    http://www.melabs.com/pbpdemo.htm
    Yes it cost some, but soooo much easier. At least we think so here.

    Have a good one!
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. Doubt with interrupt on change
    By lugo.p in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th March 2010, 15:22
  3. How to receive stream of bytes using PIC USART
    By unifoxz in forum mel PIC BASIC Pro
    Replies: 34
    Last Post: - 20th June 2009, 10:38
  4. PICBasic newbie problem
    By ELCouz in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 12th February 2008, 00:55
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07

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