What is the function of the 6 in: #byte Port_b=6 Dean Matthews You should define your Port_b like #byte Port_b=6 This is a directive - a CCS speciality. I hope this helps. Imre 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 hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads