>-----Original Message----- >From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] >Sent: 31 March 2006 10:18 >To: piclist@mit.edu >Subject: PIC16F84 to PIC16F628A > > >I contacted Karl and he responded with some info from >Microchip about the 628 chips but that information did not >mention anything about the compatability/direct replacement >issue. with the 84's > >I have since read that there is a difference between where the >program starts or initializes or something; i.e, 00HH instead >of 00AA or oooo ?????? Also something about paging. > >As you can probably tell, I'm a beginner at all of this and >need some hand holding. > >Does anyone know what I should add to my code to make the >628a's code compatabile with idential code from the 84's ? > The 16F628A is absoluetly not a direct replacement for the 16F84. It is the replacement only from an "ideal beginners part" point of view as it is cheaper and does more. The 16F84 has the bare minimum of peripherals, a single 8 bit timer and some ports are about all you get. The 16F628A gives you 3 timers, a comparator, a voltage reference and a USART. The problem you are almost certainly seeing is that some pins are configured as analog inputs for the comparator module by default. You need to switch off the comparators to get these pins back for digital operation. You do this by writing the value 7 to register CMCON. I'm not very familliar with the basic compilers, but I would assume you would need to add something like: CMCON=7 to your initialisation code. Your compiler should handle any differences in banking and paging automaticly, this is one of the advatnages of a high level language. Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist