SERIN in acii, hex, decimal?


Results 1 to 16 of 16

Threaded View

  1. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Try SerOut 0,N2400,[#DataOut].

    Note: You should try the serial terminal in the free version of MicroCode Studio.
    It's a LOT easier to use than Hyperterm.

    Also look at DEBUG. It produces a lot smaller code & works at higher data rates
    at slower osc speeds.

    Here's an example with DEBUG at 9600 baud;
    Code:
    @ device  pic12F675, xt_osc, wdt_off, mclr_off, protect_off
    
    DEFINE OSC 4
    DEFINE DEBUG_REG GPIO
    DEFINE DEBUG_BIT 0     ' GPIO.0 = serial output pin
    DEFINE DEBUG_BAUD 9600
    DEFINE DEBUG_MODE 1
    ' For DEBUG_MODE: 1 = inverted (direct connection), 0 = true (through MAX232)
    
    Loops VAR BYTE
    
    ANSEL = 0
    CMCON = 7
    
    Main:
        FOR Loops = "A" TO "Z"
            DEBUG Loops,13,10
        NEXT Loops
        PAUSE 5000
        GOTO Main
        
        END
    Last edited by Bruce; - 3rd March 2009 at 00:06. Reason: DEBUG example
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. Serin Help - ASCII to Decimal
    By Dino308gt4 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th October 2009, 23:00
  2. Hex to Ascii to Decimal
    By khoog in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 31st July 2009, 05:27
  3. hex ascii help please
    By ffr58kk90 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 29th December 2006, 21:09
  4. Convert Hex to Decimal???
    By RONKON in forum mel PIC BASIC
    Replies: 2
    Last Post: - 9th May 2006, 02:14
  5. Reading a Hex value from a Modem and showing it as Decimal..
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th March 2005, 17:58

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