HELP! HSER issues from old to new


Closed Thread
Results 1 to 12 of 12

Hybrid View

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

    Default Re: HELP! HSER issues from old to new

    that didnt help unfortunatly. I did get some stuff to work, as it seems I forgot my TRIS statement which always causes problems
    however here is my updated code
    Code:
    Include "12F1572.bas"
    DEFINE OSC 20
    
    DEFINE ADC_BITS 16 ' A/D number of bits
    DEFINE ADC_CLOCK 3 ' Uses A/D internal RC clock
    DEFINE ADC_SAMPLEUS 50 ' Set sampling time in us
    
    define HSER_BAUD 9600
    DEFINE HSER_BITS 8
    DEFINE HSER_CLROERR 1
    
    ADCON0.7 = 0
    TRISA = 0
    
    A VAR WORD 'Stores 16 Bit Analog Reading
    B VAR byte 'Temp Holder
    
    mainloop: 
    ADCIN 3, A   'Grab analog input from pin3
    porta.2 = 0
    Hserout [a,13,10]		' Send char out serial port
    pause 250
    porta.2 = 1
    pause 250
    goto mainloop		' Do it all over again
    now if i chage
    Code:
    Hserout [a,13,10]
    to
    Code:
    Hserout ["help",13,10]
    then i get help on the computer.
    still at a loss here, I'm missing something
    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
    Nov 2003
    Location
    Greece
    Posts
    4,170

    Default Re: HELP! HSER issues from old to new

    I think you are sending out the binary value of a and not the converted to ascii value.

    your HSEROUT should be something like this:

    Code:
    HSEROUT [dec5 a,13,10]
    or

    Code:
    HSEROUT [#a,13,10]
    Ioannis

Similar Threads

  1. Need help with HSER on the 16F747
    By allanb in forum Serial
    Replies: 2
    Last Post: - 18th September 2013, 05:28
  2. HSER baudrate
    By pedja089 in forum Serial
    Replies: 14
    Last Post: - 7th August 2011, 20:46
  3. HSER Problems
    By Kaldurenik in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 15th October 2007, 09:33
  4. HSER with interrupts
    By ronjodu in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 25th February 2007, 21:19
  5. Hser-rx test
    By nicjo in forum Serial
    Replies: 0
    Last Post: - 26th November 2006, 10:53

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