--0__=80256AFC0052E1A58f9e8a93df938690918c80256AFC0052E1A5 Content-type: text/plain; charset=us-ascii Hi, Is it not because of the upper case "P"/also? Presumably (uh-oh, out rolls the "presumably"), the compiler knows about "port_b" because it is used in the "#use fast_IO" but knows zippo about the "Port_b". Dan (Embedded Dale Botkin @MITVMA.MIT.EDU> image moved 06/11/2001 13:44 to file: pic21607.pcx) Please respond to pic microcontroller discussion list Sent by: pic microcontroller discussion list To: PICLIST@MITVMA.MIT.EDU cc: Subject: Re: [PIC]:help using CCS C code Security Level:? Internal You would need to use either this: output_b(value); or this: #byte port_b = 6 port_b = value; You're getting an error because the compiler does not grok "port_b", unless you've defined it somewhere. Dale -- Hallo, this is Linus Torvalds and I pronounce Linux as Leennuks. Hallo, this is Bill Gates and I pronounce 'crap' as 'Windows'. On Tue, 6 Nov 2001, MATTHEWS, DEAN (D.) wrote: > To all, > > I am trying to build the code below using a CCS C compiler without any joy. Originally I printed out the A2D conversion using the printf and rs232 function. Now I want to display the hex number in 'value' using 10 leds - 10bit a2d result. > > #device PIC16F877*16 ADC=10 > #include<16F877.h> > #use delay(clock=20000000) > #use fast_IO(port_b) > > void main (void) > { > long value; > > setup_adc_ports(RA0_ANALOG_RA3_REF); > setup_adc( ADC_CLOCK_INTERNAL ); > set_adc_channel( 0 ); > > do { > value = Read_ADC(); > delay_ms(100); > set_tris_b(0); > Port_b = value; > } while (TRUE); > } > > > I am having an error of unidentified identifier on (Port_b = value) line. > > Dean Matthews > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body --0__=80256AFC0052E1A58f9e8a93df938690918c80256AFC0052E1A5 Content-type: application/octet-stream; name="pic21607.pcx" Content-Disposition: attachment; filename="pic21607.pcx" Content-transfer-encoding: base64 CgUBCAAAAABBADEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAABQgABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAA= --0__=80256AFC0052E1A58f9e8a93df938690918c80256AFC0052E1A5-- -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body