How to use Analog interrupt in 16f72


Results 1 to 5 of 5

Threaded View

  1. #5
    Join Date
    Aug 2008
    Posts
    22


    Did you find this post helpful? Yes | No

    Default

    Thanks,
    I am using ASM code.

    but while passing the string like

    dt "UPS"

    needs any change in the program?
    or
    it is just the substitute of seperate character.plz clear me.
    lcd_init

    movlw 0x28 ; 4 bit, 2 Line, 5x7 font
    call disp_cmd
    call delay
    movlw 0x10 ; display shift off
    call disp_cmd
    call delay
    movlw 0x01 ; Clear the Display RAM
    call disp_cmd
    call delay ; Note, Can take up to 4.1 msecs
    movlw 0x06 ; increment cursor
    call disp_cmd
    call delay
    movlw 0x02 ; move the cursor to begining
    call disp_cmd
    call delay
    movlw 0x0C ; display on cursor off
    call disp_cmd
    call delay
    return

    ;Display command for 4 bit LCD

    disp_cmd ; Send the Instruction to the LCD
    movwf Temp ; Save the Temporary Value
    swapf Temp, w ; Send the High Nybble
    bcf LCD_RS ; RS = 0
    call nibbleout
    movf Temp, w ; Send the Low Nybble
    bcf LCD_RS
    call nibbleout
    return
    ;------------------------------------------------------------------------------------
    ;sending ASCII character to LCD
    disp_write
    addlw '0' ; Send nbr as ASCII character ; Send the Character to the LCD
    movwf Temp ; Save the Temporary Value
    swapf Temp, w ; Send the High Nybble
    bsf LCD_RS ; RS = 1
    call nibbleout
    movf Temp, w ; Send the Low Nybble
    bsf LCD_RS
    call nibbleout
    return
    ;sending lower and upper nibble
    nibbleout
    movwf PORTB
    bsf LCD_E
    bcf LCD_E
    nop
    nop
    return
    movlw 'UPS' ;displayin the string on LCD
    call disp_write

    can i write like this?plz reply me.

    -Raja.
    Last edited by kvrajasekar; - 2nd September 2008 at 13:09.

Similar Threads

  1. Won't go back to SLEEP after 1st Interrupt
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 29th June 2009, 09:00
  2. Can't ID interrupt source with this IntHandler??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd June 2009, 02:35
  3. Help with Analog Interrupt
    By brid0030 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 18:14
  4. NEWBIE: Some basic questions using interrupts
    By JackPollack in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 8th March 2006, 02:59
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07

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