Chris wrote: >H E L P !!!!!!!!!!!!!!!!! >I am having trouble reading the input states on PORTA of a 16F627. I have >the 627 USART set to TX to a USART RX on an 18C442. The 442 is >receiving from several devices, selection is controlled by an address bit. > >On the 627 I am using an external oscillator and MCLR, and thus can't use >RA5:7 (not a problem, I have built the word I need from input to Port A & >Port B bits) >Comparators have been disabled (CMCON = 0x07) >Voltage refs have been disabled (VRCON = 0) >TRISA = 0x1F (RA0:4 as inputs), etc...etc... In what way doesn't it work? Not transmitting the right values? Maybe post the code that shows how you construct the byte being sent. >The 627 Reads the constructed byte on the inputs and sends it to the 442. >The 18C442 sends the data as a decimal to a serial LCD via the USART TX. Can you check the serial out of the '627 with a PC to see if it's correct? >The problem: I can POR the thing repeatedly, and get the correct result on >the LCD (and presumably in the register also) about 1/2 the time. When the >LSB is set on the 627's pin, it seems more troublesome. > >Both Pica's are running on 5Mhz clocks, the 627 is a 20Mhz chip, and both >are set for 9600. Regards... -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu