In a message dated 11/16/01 6:33:36 AM Pacific Standard Time, questuk1@HOTMAIL.COM writes: > Schmitt input problem on 16F628? > > NOTE: the PIC VCC is kept at 5V at all times > -------------------------------------------------------------------- > > (The circuit I am interfaced to works at 3V) > > > > I am reading and writing data, using PortA Bit0. > > Everything works ok if the input on the PIC is +5V if I drop this to +3V > the PIC cannot read it. > If I substitute the PICF628 for PICF84 everything works correctly down to > 2.5V > > I set up the PICF628 comparators to digital input outputs like this, > > > bsf STATUS,RP0 > bcf STATUS,RP1 > > movlw B'00000001' ;All OUTPUTS except Bit0 > movwf TRISA Here's your problem. From the datasheet, page 27: RA5 is a Schmitt Trigger input only and has no output drivers. There was a post on alt.microcontrollers.8-bit with a simliar problem in that the PIC would act goofy when trying to set RA5 to output. Regards, Tim Hamel > > movlw B'00000000' ;All OUTPUTS > movwf TRISB > > bcf STATUS,RP0 > bcf STATUS,RP1 > > clrf PORTA > clrf PORTB > > movlw B'00000111' ;NOTE must be in Page0, All I/O > movwf CMCON ;Pins,Comparators by default > > > > Any ideas as to whats wrong? > > > Gary > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body