Papageorgiou Spiros wrote: > > Hi PIcers? > > I wrote a piece of code which runs fine on a 16C84 and then i tried it > on a 16C71 without success.. I don't really understand why, 'cause > the two uCs seem to be identical with the exception of course of the > DA converter of the C71 and the EEPROM of the 16C84. > Since my code doesn't use any DA or EEPROM i believe it should run on > both UC without modifications. Right? > Anybody knows what might be wrong? > > Tips: Thesame source was recompiled for each uC. > I'm testing the 2 chips on the same board that works well. (the 16C71 actually > runs). > The program doesn't even use timers and watchdogs and such things. > > Thanx > Spiros Papageorgiou > Email: > mc89114@central.ntua.gr Hi When you want to run code written for the C84 or C61 on a C71, you must add a line to your program (at the begining) in which you must set the 3 least significative bytes of the register ADCON1. If not, some inputs (RA0-3) will be configured as analog input after the reset and they do not work as you expected (as digital inputs). Bye. --|----------------------------------------------------------------|-- --| |-- --| Fernando G. Martin EMAIL fgmartin@starnet.net.ar |-- --| |-- --|----------------------------------------------------------------|--