We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi again, I am using C167. I am using PEC for AD-conversion. I configure PEC as follows: ADCIC = 0x007B; PECC3 = 0x00FF; SRCP3 = (int) (&ADDAT); DSTP3 = (int) (&P3); ADCON = 0x0090; I works fine to transfer values to from ADDAT to port P3. . Now I want to determine how many times AD-conversion has taken place. In PECCx there are 8-LSB are: COUNT (PEC Transfer Count) Now I wonder if I am on right track or there are other way to do what I want. Even if I use the 8-LSB of PECCx I can have the max value 2 raised to power 8 i.e. 256, what happens if the nr of AD-conversion exceed 256? Can someone help me in this regard? Send me mail if something is not clear. thanks in advance regards /M
HI Mohammad Your array needs place for 100 entries if you want to do 100 PEC transfers. unsigned int AD_buffer[100]; I always use the following syntax to init the PEC Destination pointer DSTP0 = _sof_ (AD_buffer); I don't know if your syntax runs correctly. During the interrupt function you have to reinitialize all the PEC registers if you want to have a continous conversion mode. regards Uwe