| ??? 12/05/02 12:41 Read: times |
#33826 - RE: PCA interrupt more |
Well, I've found one issue but it still doesn't wortk !!!
I've included the header file from Keil for registers declaration. But there is errors on PCA registers adress in this file. Maybe this header file was for an other 8051 device and couldn't match with 89c668. /*-------------------------------------------------------------------------- REG51F.H Header file for Philips 8xC31/51, 80C51Fx, 80C51Rx+ Copyright (c) 1988-1999 Keil Elektronik GmbH and Keil Software, Inc. All rights reserved. Modification according to DataSheet from April 1999 - SFR's AUXR and AUXR1 added for 80C51Rx+ derivatives --------------------------------------------------------------------------*/ .... /* 80C51Fx/Rx Extensions */ .... sfr CCON = 0xD8; !! INSTEAD OF 0xC0 sfr CMOD = 0xD9; !! INSTEAD OF 0xC1 sfr CCAPM0 = 0xDA; !! INSTEAD OF 0xC2 sfr CCAPM1 = 0xDB; !! INSTEAD OF 0xC3 sfr CCAPM2 = 0xDC; !! INSTEAD OF 0xC4 sfr CCAPM3 = 0xDD; !! INSTEAD OF 0xC5 sfr CCAPM4 = 0xDE; !! INSTEAD OF 0xC6 .... Now, I've still a problem. When writing to CCON register, the software bugs ! The error occurs when after initialising all PCA registers I try to set the CR bit to run the PCA. I've tried : - CR = 1; as CCON is bit adressable - CCON = 0x40; But the result is the same : bug ! An idea ? Stephane |



