Searching \ for '[PIC] ADC clock source bemusement 16F690' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=adc
Search entire site for: 'ADC clock source bemusement 16F690'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] ADC clock source bemusement 16F690'
2011\07\08@190119 by cdb

flavicon
face
Microchip have me confuddled on choosing the clock source for the 16F690 chip.
They state on page 109 (111 in pdf numbering) under note 4:

When the device frequency is greater than 1 MHz, the FRC clock source is only recommended if the conversion will be performed during Sleep.

And yet, all public code including Microchips' that I've seen use the FRC, most recently the code in their new Pic starter kit uses the FRC, they are using the internal 8MHz oscillator, but that is well, eight times over 1MHz.

I will be using an 11.059MHz crystal and therefore a /32 prescaler will bring the clock into the ADC frequency range.

I just can't get my head around why they recommend against using it and then do so themselves (Microchip demo code reputation notwithstanding). Surely the internal FRC will have less jitter and noise?

Colin --
cdb,  on 9/07/2011




2011\07\10@025025 by cdb

flavicon
face
I have a further question about the ECCP special event trigger which the data sheet doesn't specifically answer.

I have set the CCP1CON register to Special event trigger that is bits CCP1M3:CCP1M0 = b'1011 .

The compare interrupt is set at approx 20mS which is working.

It doesn't seem to be starting an A2D conversion. My question is, should the GO/DONE bit in ADCON0  be set by the ECCP or does the trigger bypass that bit.

I haven't tried it in hardware as yet, but two simulators don't show it being set.

Colin



--
cdb, spam_OUTcolinTakeThisOuTspambtech-online.co.uk on 10/07/2011
Web presence: http://www.btech-online.co.uk   Hosted by:  http://www.justhost.com.au
 This email is to be considered private if addressed to a named  individual or HR department, and public if addressed to a blog,  forum or news article.

2011\07\10@081228 by Kerry Wentworth

flavicon
face
According to AN594, only CCP2 sets the GO/DONE flag, CCP1 does not.

Kerry



cdb wrote:
{Quote hidden}

>

2011\07\10@083428 by cdb

flavicon
face
part 1 933 bytes content-type:text/plain; charset="us-ascii" (decoded quoted-printable)



:: According to AN594, only CCP2 sets the GO/DONE flag, CCP1 does not.

Yes I read that in AN594 which confused me even more, but the datasheet for the 16F690 on page 129 says.

11.2.4 SPECIAL EVENT TRIGGER
When Special Event Trigger mode is chosen
(CCP1M<3:0> = 1011), the CCP module does the
following:
? Resets Timer1
? Starts an ADC conversion if ADC is enabled

ADC is enabled, if I physically set the ADGO bit everything works as expected. I get an ADC conversion every 20ms.  The midrange CCP manaul doesn't have much to say and I suspect it isn't upto date.

Thank you for the help.

Colin


--
cdb, colinspamKILLspambtech-online.co.uk on 10/07/2011
Web presence: http://www.btech-online.co.uk   Hosted by:  http://www.justhost.com.au
 This email is to be considered private if addressed to a named  individual or HR department, and public if addressed to a blog,  forum or news article.
 


part 2 181 bytes content-type:text/plain; name="ATT00001.txt"
(decoded base64)

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
mailman.mit.edu/mailman/listinfo/piclist

2011\07\10@115617 by Kerry Wentworth

flavicon
face
Yup, it sure does say that! Two possibilities come to mind:

1) The simulator assumes that CCP1 doesn't set GO/DONE, only CCP2 does, but the actual chip will work fine.

2) The data sheet is a cut and paste job, and does not reflect what is in the chip. This is not unheard of. According to the block diagram of the Timer1 module for the 16F88X, setting T1ACS to 1 causes Timer1 to count at Fosc instead of Fosc/4, but it doesn't HAVE a T1ACS. They cut and pasted the Timer! block diagram from some other PIC.

The only way to know which is true is to try the actual chip.

Kerry



cdb wrote:
{Quote hidden}

>

2011\07\12@022449 by cdb

flavicon
face
I have just found a similar question on the Microchip forum (obviously I must have used the wrong phrase for searching). The simulator in MPLAB and apparently MPLAB X will not start the ADC conversion, real silicon does.

So if anyone needs to simulate this you will have to add temproary code setting the GO_DONE bit.

http://www.microchip.com/forums/m95630-print.aspx

Colin
--
cdb, EraseMEcolinspam_OUTspamTakeThisOuTbtech-online.co.uk on 12/07/2011
Web presence: http://www.btech-online.co.uk   Hosted by:  http://www.justhost.com.au
 This email is to be considered private if addressed to a named  individual or HR department, and public if addressed to a blog,  forum or news article.

More... (looser matching)
- Last day of these posts
- In 2011 , 2012 only
- Today
- New search...