Thanks, Pekka, there are a couple of tricks there that I hadn't thought of. I like the idea of defining the pullups bit and setting it directly - there are a number of other bits that this trick would work well on. Usually I just dive into assembler for these tasks. Despite what others say here, I'm beginning to like CCS as well. Most of the problems I have had were traced to the keyboard entry algorithm (i.e. me+ACE- +ADw-G+AD4-) not to the compiler. -- Lawrence -----Original Message----- From: Pekka Ritamaki +ADw-pri+AEA-SCI.FI+AD4- To: PICLIST+AEA-MITVMA.MIT.EDU +ADw-PICLIST+AEA-MITVMA.MIT.EDU+AD4- Date: Friday, October 01, 1999 8:46 AM Subject: CCS/PCM PIC12C762 pullups Lawrence Lile +ADw-lilel+AEA-TOASTMASTER.COM+AD4- writes: +ADw-Same for the weak pullup bit (Option Bit 7) ?? Is it initialized by this +ADw-command? Lawrence, CCS uses its own function to portb pullups, see page 51 in the CCS manual or table of contents: port+AF8-b+AF8-pullups(true)+ADs- // If not PCM be sure to use external pullup s or you can use direct memory manipulation +ACM-byte OPTION +AD0- 0x81 +ACM-bit pullups +AD0- OPTION.7 and then void main ( void) +AHs- setup+AF8-counters(RTCC+AF8-INTERNAL,WDT+AF8-2304MS)+ADs- pullups +AD0-0+ADs- // enable pullups ... +AH0- You can look very easily after compile in assembly: Filename: D:+AFw-PIC+AFw-1999+AFw-SMART+AFw-LIGHT+AFw-TEST2.LST --- 0000: BSF 03,5 0001: MOVWF 0F 0002: CLRF 0A 0003: GOTO 004 0004: MOVLW 00 0005: MOVWF 0A 0006: GOTO 007 .................... +ACM-include +ADw-12C672.h+AD4- .................... +ACM-device PIC12C672 .................... +ACM-list .................... +ACM-byte OPTION+AD0-0x81 .................... +ACM-bit pullups+AD0-OPTION.7 .................... void main ( void) .................... +AHs- 0007: CLRF 04 // Indirect file clear 0008: MOVLW 1F // moov literal 0009: ANDWF 03,F // to status register .................... // not used here: setup+AF8-counters(RTCC+AF8-INTERNAL,WDT+AF8-2304MS)+ADs- .................... pullups +AD0-0+ADs- // enable pullups 000A: BSF 03,5 // bank switching 000B: BCF 01,7 // bit 7 clear in oprion reg 000C: BCF 03,5 // bank switching again .................... +AH0- 000D: SLEEP -- I think like CCS PIC-C-compiler in very good Pekka +AKQAugCwAGAAsAC6AKQA+A-,+ALgAuA-,+APgApAC6ALAAYACwALoApAD4-,+ALgAuA-,+APg- Pekka Ritamaki, Probyte Oy Microprocessor software +ACY- hardware design Nirvankatu 31, 33820 TAMPERE, FINLAND http://www.sci.fi/+AH4-pri tel: Int. 358-3-2661885 fax: Int. +358-3-2661886 email:pri+AEA-sci.fi