Need advice how to.


Results 1 to 5 of 5

Threaded View

  1. #5
    Join Date
    May 2007
    Location
    Republic Serbia
    Posts
    105


    Did you find this post helpful? Yes | No

    Smile

    Quote Originally Posted by mackrackit View Post
    OK, misunderstanding.
    I seem to remember this
    Code:
    X1 = (NUMS[1]-"0")
    The -"0" is what you need.
    I think
    Here is my success test of geting index from array.
    After geting and ading decimal integer from example "10ABCDEF"
    x3 will be decimal 10 and i can add it with 128(first place on first line on 4x20 LCD...
    And there I can display rest of sting from array "ABCDEF"...
    Thank's to all who make me to little more think with my head...
    Robert

    Code:
    @ Device pic16F877, HS_OSC, BOD_ON, PWRT_OFF, WDT_ON, PROTECT_OFF
        define OSC 20
        ADCON0.0 = 0
        ADCON1 = 7
        DEFINE HSER_RCSTA 90h            ' enable receiver,
        DEFINE HSER_TXSTA 24h            ' enable transmit, BRGH=1
        DEFINE HSER_SPBRG 129            ' baud rate RS232 9600 Bauds
        DEFINE HSER_CLROERR 1            'Clear overflow automatically
        x1 var byte
        x2 var byte
        x3 var byte
        y var byte[8]
        
    start:
        hserin [str y\8]
        x1 = y[1]
        x2 = y[0]
        x1 = x1-48
        x2 = x2-48
        x3 = (10*x2)+(1*x1)
        hserout [dec x3,13,10]
        RCSTA.4 = 0
        RCSTA.4 = 1 
        goto start
        end
    Last edited by phoenix_1; - 21st May 2008 at 20:54.

Similar Threads

  1. Advice on Wiegand Buffer
    By brutc001 in forum Schematics
    Replies: 0
    Last Post: - 19th December 2009, 00:31
  2. Need "PIC16F84A" Controler schematic Advice...
    By Kyo_89 in forum Schematics
    Replies: 1
    Last Post: - 27th May 2009, 23:03
  3. Your OTP advice?
    By truvahorse in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 28th June 2008, 16:37
  4. Decoding an incoming infrared signal: need advice
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 9th May 2008, 16:28
  5. Advice needed on 'neat' Project!
    By vacpress in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th February 2007, 06:21

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