On Sun, Oct 17, 2004 at 11:25:34AM +1000, Mr.Pink bedak wrote: > hi.. > Is there any configurtion that i need to > change so that 16f628 act like the 16F84? The changes listed below. Microchip consistently takes any analog inputs and configures them as analog by default. So when you want to emulate a 16F84A, which has no analog inputs, you have to change them to digital. The CMCON register, which controls the analog comparators on the 16F628 is what you need to set. >what abouT > USART?should i include some command in my programing? The by far best description of the PIC USART is Fr. Tom McGahee's PICUART tutorial. You can find it here: http://www.pic101.com/mcgahee/index.html The specific example for the 16F628 derived from Fr. McGahee's code can be found here: http://www.amrad.org/projects/lf/PIC8_4B.ASM BAJ > --- Sascha wrote: > > > > I use this to configure the 16F628 to act like the > > 16F84: > > > > CLRF PORTA > > MOVLW b'00000111' > > MOVWF CMCON ; turn off comparators > > CLRF STATUS > > BSF STATUS,RP0 ; select BANK1 for operation > > CLRF TRISB ; config PORTB & PORTA pins > > CLRF TRISA > > ; do OPTION_REG configuration here > > ; do INTCON configuration here > > BCF STATUS,RP0 ; back to BANK0 > > MOVF CMCON,F > > > > Regards, > > Sascha > > > > > Find local movie times and trailers on Yahoo! Movies. > http://au.movies.yahoo.com > _______________________________________________ > http://www.piclist.com > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist _______________________________________________ http://www.piclist.com View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist