Code for Send/Receive TTL/Comport Sample?


Closed Thread
Results 1 to 40 of 53

Hybrid View

  1. #1
    Join Date
    Dec 2012
    Location
    Tennessee
    Posts
    262


    Did you find this post helpful? Yes | No

    Default Re: Code for Send/Receive TTL/Comport Sample?

    yes charlie the cable i have is a usb to serial with a ttl chip built in, so its a USB to TTL cable

    pedja, going to try that and see what happens, not sure what your code is going to do
    Chris


    Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."

  2. #2
    Join Date
    Dec 2012
    Location
    Tennessee
    Posts
    262


    Did you find this post helpful? Yes | No

    Default Re: Code for Send/Receive TTL/Comport Sample?

    OK the Data from PIC to PC works fine, but from PC to PIC fails, heres code Im working with, NOTE that im am still using 9600 8N1 on the pc.

    Code:
    Define OSC 20	'USE ECIO, NOT ECPIO
    define HSER_BAUD 9600
    DEFINE HSER_BITS 8
    DEFINE HSER_CLROERR 1
    RCSTA = $90
    TXSTA = $20		'DO NOT USE $24
    TRISC = %10000000
    TRISD = 0
    
    MYBYTE VAR BYTE
    
    MAINLOOP:
    mybyte = 0
    Hserin [MYBYTE]
    LCDOUT $FE, 2
    LCDOUT $FE, $80
    LCDOUT "MYBYTE = ", DEC MYBYTE
    Hserout ["Received = ", mybyte, 13, 10]
    goto mainloop
    LCD display numbers from 130 - 137 based on what character is sent, only a few characters work, say d - l (lower case) and they dont corrospond to any numbering system i was hoping for ascii values
    Chris


    Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."

Similar Threads

  1. how to send and receive sms using vb?
    By shyhigh2002 in forum Off Topic
    Replies: 0
    Last Post: - 1st April 2009, 10:18
  2. please who can help me for sample code
    By jasem700 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd February 2009, 21:41
  3. How to build modem for only send and receive the msg
    By PoTeToJB in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 7th April 2006, 14:37
  4. send and receive data using pic 16f84a
    By PoTeToJB in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 28th February 2006, 21:12
  5. send and receive data using pic 16f84a
    By PoTeToJB in forum Serial
    Replies: 1
    Last Post: - 25th February 2006, 15:47

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