Anthony Nixon
2017-12-21 06:38:52 UTC
Hi all,
I'm trying to use the Hi Lo Voltage detect on a 18F47K40 but it
doesn't seem to work.
I have enabled the module via the CMD0 bit 6 = 0
BANKSEL HLVDCON1
movlw b'00001010' ; 3.7V
movwf HLVDCON1,BANKED
movlw b'10000000'
movwf HLVDCON0,BANKED ; HLVD enabled, no IRQ flags
nop
movf HLVDCON0,W,BANKED
call pcXmit ; W -> PC - proper banking set - sends 0x00
...
I set bit7 of HLVDCON0 to enable it but when I read the HLVDCON0 value
back via a PC USB port, (which I know works) it stays as 0x00.
(BANKSEL HLVDCON0 has the same problem)
Looking around the web, other 18F models seem to use it ok.
Any ideas
cheers
Tony
I'm trying to use the Hi Lo Voltage detect on a 18F47K40 but it
doesn't seem to work.
I have enabled the module via the CMD0 bit 6 = 0
BANKSEL HLVDCON1
movlw b'00001010' ; 3.7V
movwf HLVDCON1,BANKED
movlw b'10000000'
movwf HLVDCON0,BANKED ; HLVD enabled, no IRQ flags
nop
movf HLVDCON0,W,BANKED
call pcXmit ; W -> PC - proper banking set - sends 0x00
...
I set bit7 of HLVDCON0 to enable it but when I read the HLVDCON0 value
back via a PC USB port, (which I know works) it stays as 0x00.
(BANKSEL HLVDCON0 has the same problem)
Looking around the web, other 18F models seem to use it ok.
Any ideas
cheers
Tony
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist