[SOLVED] help with 16f506 not setting output hi..

Status
Not open for further replies.

ghead

Member level 2
Joined
Nov 19, 2010
Messages
43
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
2,384
Hi all I've written a volt meter program (in .asm) for use in my car using PIC16F506 (this is first time using '506)
when i run the following code CH0-1 of PORTB and PORTC don't latch at all. I've attached whole program as well as i'm not 100% on my layout.

Code ASM - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
MAIN    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    movlw 0xFF
    movwf PORTC
    movlw 0xFF
    movwf PORTB
    call  del_3       ;RC0-1 AND RB0-1 DON'T GO HI HERE?????
    call  del_3       ;ALL BUT RB2-3 SHOULD OUTPUT A HI........
    call  del_3
    call  del_3
    clrf PORTC
    clrf PORTB
SUB
    call  ADREAD
    call  CONADR
    call  CONDISP
    call  DISPLAY
    GOTO  SUB




Cheers for any help
 

Attachments

  • VOLT16F506.txt
    5.6 KB · Views: 97

is it possible that those i/os configured as analog/comparator input?
 
Reactions: ghead

    V

    Points: 2
    Helpful Answer Positive Rating

    ghead

    Points: 2
    Helpful Answer Positive Rating
Yes!!!!! thank you, didn't read thoroughly enough so didn't realize about comparator set on by default
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…