Searching \ for 'CCS/PCM PIC12C762 pullups' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'CCS/PCM PIC12C762 pullups'.

Truncated match.
PICList Thread
'CCS/PCM PIC12C762 pullups'
1999\10\01@094517 by Pekka Ritamaki

flavicon
face
  Lawrence Lile <spam_OUTlilelTakeThisOuTspamTOASTMASTER.COM> writes:

<Same for the weak pullup bit (Option Bit 7)  ??  Is it initialized by
this
<command?

Lawrence,
CCS uses its  own function to portb pullups, see page 51 in the CCS
manual or  table of contents:
port_b_pullups(true);   // If not PCM be sure to use external pullups

or you can use direct memory manipulation
#byte OPTION = 0x81
#bit pullups = OPTION.7

and then
void main ( void)
{
setup_counters(RTCC_INTERNAL,WDT_2304MS);
pullups =0; // enable pullups
...
}
You can look very easily after compile in assembly:

              Filename: D:\PIC\1999\SMART\LIGHT\TEST2.LST
---
0000:  BSF    03,5
0001:  MOVWF  0F
0002:  CLRF   0A
0003:  GOTO   004
0004:  MOVLW  00
0005:  MOVWF  0A
0006:  GOTO   007
....................  #include <12C672.h>
.................... #device PIC12C672
.................... #list
.................... #byte OPTION=0x81
.................... #bit pullups=OPTION.7
.................... void main ( void)
.................... {
0007:  CLRF   04    // Indirect file clear
0008:  MOVLW  1F    // moov literal
0009:  ANDWF  03,F  // to status register
.................... // not used here:
setup_counters(RTCC_INTERNAL,WDT_2304MS);
.................... pullups =0; // 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
.................... }
000D:  SLEEP

--
I think like CCS PIC-C-compiler in very good

Pekka

Û¼¡`¡¼Û¿,üü,¿Û¼¡`¡¼Û¿,üü,¿
Pekka Ritamaki, Probyte Oy Microprocessor software & hardware design
Nirvankatu 31, 33820 TAMPERE, FINLAND http://www.sci.fi/~pri
tel: Int. 358-3-2661885 fax: Int. +358-3-2661886 email:.....priKILLspamspam@spam@sci.fi

1999\10\01@101356 by Lawrence Lile

flavicon
face
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 removed}

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...