Hyper Terminal Displaying Random Characters [PIC to PC via UART]


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166

    Default Re: Hyper Terminal Displaying Random Characters [PIC to PC via UART]

    arson88 , If you want to see the characters received by the PC you should be running a terminal emulator program that will allow you to see the hex value of the received byte. I always use an old program called QMODEM which allows you to see any non printable characters like control characters. You do realize that there are more than 127 non printable characters that are possible to be sent via RS-232. I do not use Hyperterminal as the screen view is not big enough. There are a lot of other programs out there that will allow you to view the received byte value... Just look...

    Dave Purola,
    N8NTA

  2. #2
    Join Date
    Apr 2011
    Posts
    5

    Default Hyper Terminal Displaying Random Characters [PIC to PC via UART]

    BTw, i am using http://www.cytron.com.my/viewProduct...7nn82zcVu7Ut0=
    , a USB to UART Converter.

  3. #3
    Join Date
    Apr 2011
    Posts
    5

    Default Hyper Terminal Displaying Random Characters [PIC to PC via UART]

    nvm, i got the program right..
    INCLUDE “modedefs.bas” ‘ Serial communication mode definition file
    DEFINE OSC 20 ‘ Oscillator speed is set to 20MHz
    TRISB = %11111111
    TRISC = %10000000 ‘ RC.7 => USART RX pin set to input
    PortC = 0
    SPBRG = 129 ‘ Baud Rate = 9600
    ‘ Variable definition
    ‘ ===================
    ‘
    count01 VAR BYTE ‘ variable to store TXREG content
    TXSTA = %00100100 ‘ Enable transmit and asynchronous mode
    RCSTA = %10010000 ‘ Enable serial port and continuous receive
    mainloop:
    IF (PortB.7 = 1) THEN
    FOR count01 = 1 TO 30
    PAUSE 2000
    TXREG = count01 + $30 ‘ Transmit Data
    HIGH PortD.2
    PAUSE 2000
    LOW PortD.2
    Next
    ENDIF
    GOTO mainloop
    END

    The result displayed in Hyperterminal:
    ASCII Character: 1, 2, 3, 4, 5, 6, 7, 8, 9, :, ; < until the 30th ASCII Character
    referred to page 203, PIC MCU With PICBasic [Chuck Hellebuyck]

    How do i convert the ASCII characters i received via Visal Basic 2010's serial port into integers?

    I used tiktakx's vb coding http://tiktakx.wordpress.com/2010/11...10/#comment-97

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