UART questions


Closed Thread
Results 1 to 9 of 9

Thread: UART questions

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: UART questions

    I have everything working for the most part. It's a little buggy but hopefully I can sort that out over time. I have a question about sorting the data. The data comes to me in this form:

    *DATA* 84 324 2343 211 2345 234 DONE
    ID: 24
    I want to take the six numbers on the first line and assign variables to them and then do stuff with them. How can I do that? Also, if I was to push out 100 variables in one shot, would that work or is it considered normal practice?

  2. #2
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: UART questions

    One other question. When I'm using SPI, my settings are as follows:
    Code:
    SSPSTAT = %01100100      
     SSPCON1 = %00100001 
     BAUDCON = %00001111
    When I switch to UART, I do the following:
    Code:
    SELECT case TIMER
            CASE 255
                SSPSTAT = 0     
                SSPCON1 = 0
                BAUDCON = 0
                PAUSE 1000
                for x=1 to 10
                HSEROUT ["FAN: ",DEC FAN]
                pause 10
                next x
                SSPSTAT = %01100100      
                SSPCON1 = %00100001 
                BAUDCON = %00001111
                pause 100
        END SELECT
    Using one or the other (initial programming), it works correctly. When I use the code above, the data goes out but it's garbled. Instead of the fan information, I get stuff like "* "

    Any ideas?

Similar Threads

  1. PK2 UART tool
    By cncmachineguy in forum Serial
    Replies: 13
    Last Post: - 24th May 2011, 08:00
  2. using Quad UART
    By harryweb in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 30th April 2011, 00:13
  3. UART-not consistant
    By Macgman2000 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 21st August 2008, 03:14
  4. How to set up UART??
    By jkbpower in forum Serial
    Replies: 8
    Last Post: - 25th April 2007, 07:09
  5. External UART IC
    By Terry in forum General
    Replies: 4
    Last Post: - 22nd December 2005, 18:01

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