12f675_fuse_about_to_blow!


Results 1 to 40 of 929

Threaded View

  1. #26
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi Guys

    I think I need a pointer. How do I 'capture' an 'operator'?

    When I want a DEC NUM1 sent I can see how [DEC NUM1] receives a decimal number. From the manual WAIT ( ) seems to be the best fit for an 'operator' or maybe something like CHAR " "

    Here's a section of the program:

    Code:
    OP VAR BYTE
    MAIN:
    PAUSE 7000
    SEROUT2 PORTC.3, 16780, ["Please send NUM1", 10, 13] 
    PAUSE 500
    HIGH PORTA.5          'Shows request sent
    PAUSE 1000
    LOW PORTA.5
    
    PAUSE 250
    SERIN2 PORTC.5, 16780, [DEC NUM1]'MODE 16780 = 2400 BAUD INVERTED
    PAUSE 500
    HIGH PORTA.5          'Shows data arrived
    PAUSE 1000
    LOW PORTA.5
    
    PAUSE 250
    SEROUT2 PORTC.3, 16780, ["Please send Operator + - * /"][WAIT OP( ),]  
    PAUSE 500
    HIGH PORTA.5          'Shows request sent
    PAUSE 1000
    LOW PORTA.5
    Here's were I'm struggling
    Code:
    SEROUT2 PORTC.3, 16780, ["Please send Operator + - * /"][WAIT OP( ),]
    Dave
    Last edited by LEDave; - 17th April 2010 at 01:31.

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