Hello Christopher Have a look at the data sheet at the I/O port part. Some of the porta pins have additional features assigned to it as the default, and you must change that so that it is configured as io ports and not something else. E.g. you should move a value of 7 (b'111') to the cmcon register to deactivate all the comparitors, and enable the io pins. Hope this will help Regards, Mias van Vuuren -----Original Message----- From: Christopher Tyler [mailto:holochris_za@YAHOO.CO.UK] Sent: Monday, September 10, 2001 10:53 To: PICLIST@MITVMA.MIT.EDU Subject: [PIC]:16F628 from 16F84 Hi all I am working on a project that was using the 16F84. On this chip, the program runs perfectly. But we are trying to cut our costs. Someone suggested we use the 16F628 instead. I had a look at the data sheets on the 16C628, and they seem mostly the same. So I moved to the new chip. But now the program doesnt work anymore. The problem is when simulating using MPLAB. U can't change the state of any of the "pins" on PORTA. I have tried using Pin Stimulis Files, Asynchronis Stimulis, etc. But none of the pins ever go high. Port B works fine. Does anyone know what I could be doing wrong? We havent used the 628 before....are there any issues to watch out for? (Like the fact that the General purpose data memory starts at 20h instead of 0Ch on the 16C84) We had similar (unsovled) problems when we tried to change the code to work on a 12C508. GPIO,4 would not go high. Could it be something to do with weak-pull ups or whatever? :) Here is what the code looks like that sets up the ports,etc. Maybe that will help? #include P16F628.inc LIST P=PIC16F628 PORTASETUP EQU B'00000011' PORTBSETUP EQU B'00001111' STATUS EQU H'03' FLAG1 EQU H'20' TIME1 EQU H'21' DELAY EQU H'22' DELAY2 EQU H'23' DELAY3 EQU H'24' DIP EQU H'25' TMOUT EQU H'26' SERVFLG EQU H'27' LED1FLG EQU H'28' LED2FLG EQU H'29' LED3FLG EQU H'2A' LED4FLG EQU H'2B' LEDSTAT EQU H'2C' org H'01' START bsf STATUS,5 movlw PORTASETUP movwf h'85' movlw PORTBSETUP movwf h'86' movlw b'00000111' movwf 81h ;OPTION register bcf STATUS,5 clrf PORTA clrf PORTB clrf LEDSTAT ; goto MAIN Thanks for help in advance..... :) Christopher Tyler -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.