Hi Gilles I think your problem is the "Else" statement. This should be in a C "Block" (surrounded by { } ). Otherwise the compiler thinks the else refers only to the next statement which in your case is the "output_low(PIN_B1);" This means that every time through the loop, the output_low(PIN_A3); is being executed so there would be a very brief pulse at the output of A3, not the intended long pulse. Try something like: If (string[i] == '1') { output_high(PIN_B1); output_high(PIN_A3); } Else { output_low(PIN_B1); output_low(PIN_A3); } // delay here.. Hope that helps, Cheers, Ash. --- Ashley Roll Digital Nemesis Pty Ltd www.digitalnemesis.com Mobile: +61 (0)417 705 718 > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Gilles Auger > Sent: Sunday, 30 June 2002 12:23 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: [PIC]:PCW 16f628 and port A > > > Hi > > I just want to make A3 an output . > I send the same timing to A3 and B1. > With B1 the timing is perfect, but with port A3 i have nothing ! > > I set the fuse, the I/O and i desable the analog as follow with PCW. > > #fuses INTRC,WDT,PUT,NOMCLR,INTRC_IO,NOLVP, > #use fast_io(B) > #use fast_io(A > > set_tris_a (0); > set_tris_b (0); > > setup_vref(FALSE); > setup_comparator(FALSE); > > I am shure that i skip something, but what. Can you help me on that ? > > Thanks a lot for your collaboration and excuse my English. > > > > > void main() { > > char string [28] = "11101110100011101110100000" ; > int i,j; > > set_tris_a (0); > set_tris_b (0); > > setup_wdt(WDT_72MS); > setup_counters(RTCC_INTERNAL,RTCC_DIV_2); > setup_timer_1(T1_DISABLED); > setup_timer_2(T2_DISABLED,0,1); > setup_vref(FALSE); > setup_comparator(FALSE); > > while(1) > { > for (i=0;i<26;++i) > { > If (string[i] == '1') > { > output_high(PIN_B1); > output_high(PIN_A3); > } > Else > output_low(PIN_B1); > output_low(PIN_A3); > //delay_ms(333); > for (j=0;j<185 ;++j) > { > restart_wdt(); > delay_ms(16); > set_tris_a (0); > set_tris_b (0); > } > } > } > } > > -- > 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