simple error?


Closed Thread
Results 1 to 3 of 3

Thread: simple error?

  1. #1
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322

    Default simple error?

    So I get this message "Warning [202] Argumnent out of range. Least significant bits used. What's wrong?


    '************************************************* ****
    '* Name : RS-232-OSD-TEST.BAS *
    '* Author : Ed Cannady *
    '* Notice : Copyright (c) 2005 All Rights Reserved *
    '* *
    '* Date : 4/29/2011 *
    '* Version : 1.0 *
    '* Notes : For a 18F1320 *
    '* : *
    '************************************************* ****
    '******* Examples from the OSD book ******************
    ' SEROUT2 PORTB.0 ,16416, [$E3, $E5, $00, $00, VARIABLE1, $E5, $01, $00, VARIABLE2]
    ' Example: Clearing The Screen
    ' Send 0xE3h - Clear the entire screen with spaces
    ' Example: Sending Text
    ' Send 0xE5h, 0x00h, 0x00h - Set cursor position 0, 0
    ' Send "Hello world!" - Send ASCII text
    ' Example: Sending Blinking Text
    ' Send 0xE5h, 0x00h, 0x00h - Set cursor position 0, 0
    ' Send 0xE6h, 0x01h - Set character blink attribute (ON)
    ' Send "Blinking text!" - Send ASCII text
    ' Send 0xE6h, 0x00h - Set character blink attribute (OFF)
    Include "Modedefs.bas"
    ' ** Set Xtal Value in MHz **
    Define OSC 20 ' Set Xtal Frequency
    ' Baud is Driven, Inverted, None @ 19,200
    ' OSD wants 19,200, 8 data bits, 1 stop bit, inverted data
    num1 var word
    num2 var word
    num1 = 1000
    num2 = 2000

    Start:
    serout2 PORTB.0,16416,[$E5,$02,$01,$E50,num1,$E5,$03,$01,$E53,num2]
    End

  2. #2
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530

    Default Re: simple error?

    It doesn't like the 3 digit hex numbers:
    serout2 PORTB.0,16416,[$E5,$02,$01,$E50,num1,$E5,$03,$01,$E53,num2]

    Don't you want to send a $E5,$0 or something like that anyway?

  3. #3
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322

    Default Re: simple error?

    Hi Walter!
    Thanks I just got carried away with the "E's" and it should be $50 and $53!

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