From: ian Date: Fri, 2 Dec 2005 02:48:57 +0000 (+0000) Subject: shut down comparators and A/D converter X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=c3d902b152b24281d4e34e3ba17a09c1d8b5678c;p=trains.git shut down comparators and A/D converter --- diff --git a/detpic/detect.asm b/detpic/detect.asm index fd0a9ac..8709db4 100644 --- a/detpic/detect.asm +++ b/detpic/detect.asm @@ -54,8 +54,17 @@ message_buffer_end ;====================================================================== code +;---------- +det_common_setup + mov_lw 0b111 ; turn off comparator, or we can't use pins + mov_wf CMCON ; RD0-RD4 as digital inputs + mov_lw 0b0110 ; turn off A/D except perhaps for pin + or_wff ADCON1 ; AN0 ie SPARE ie RA0 (same reason as above) + return + ;---------- det_slave_setup + bsr det_common_setup set_f scana set_f scanb set_f scanc