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?

    thanks thats good to know, ive been up all night messing with VB, ive got it set up to convert 2 - 8bit numbers to their ascii characters and then I can send that to the PIC, I should be able to just use those as 2 seperate bytes, i could use byte 1 to control the HPWM and byte 2 to control PORTB outputs. later I can add more bytes for other stuff but this should be enough to test with I would think.

    how do I go about receiving data either on the PIC or the PC, On the PIC do i just make a loop with HSERIN? On the PC do I have to have a timer just sending the data over and over? or does the SEROUT just keep sending the data over and over on its own? I just wonder if when I get to the code to send data to the PC, what if the PC isnt listening right that instant?
    Last edited by wdmagic; - 29th June 2013 at 14:39.
    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 2010
    Posts
    409


    Did you find this post helpful? Yes | No

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

    The manual explains how to use hardware or software inputs that either wait for a character, or operate from an interrupt. (or even press help in the editor) :-)

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,705


    Did you find this post helpful? Yes | No

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

    Not absolutely sure chris.
    If you are going to load the spbrg regs manually then yes defnitely the brgh bit needs to be set or reset accordingly
    but i assume when using hserout pbp will make its own choice for brgh depending on osc and baud rate defines , if you change it afterwards then things go wrong

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 : 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