CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

16F876 - 20 Mhz

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Detienne G.
Guest







16F876 - 20 Mhz
PostPosted: Mon Jun 09, 2003 6:13 am     Reply with quote

I use a 16F876 with Max 232, crystal of 16 Mhz, capa of 27 pF. I write few lines of code to send characters (9600 bauds) on C6 . (#fuse HS,NOWDT,PUT,BROWNOUT,WRT,NOLVP)
No problems, all works fine.

Now, if I use a crystal of 20 Mhz ( I change also the frequency in the C code ) the characters are unreadables..... Why ?

It's not a problem with PCW ( I have test with version 3.125 and 3.160 and with two PIC ). On both PIC it's write PIC16F876-04/SP. What means 04/SP ? Is it the reason ?

Have somebody meet this problem ?
Thanks a lot.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515106
Nikki
Guest







Re: 16F876 - 20 Mhz
PostPosted: Mon Jun 09, 2003 6:40 am     Reply with quote

:=I use a 16F876 with Max 232, crystal of 16 Mhz, capa of 27 pF. I write few lines of code to send characters (9600 bauds) on C6 . (#fuse HS,NOWDT,PUT,BROWNOUT,WRT,NOLVP)
:=No problems, all works fine.
:=
:=Now, if I use a crystal of 20 Mhz ( I change also the frequency in the C code ) the characters are unreadables..... Why ?
:=
:=It's not a problem with PCW ( I have test with version 3.125 and 3.160 and with two PIC ). On both PIC it's write PIC16F876-04/SP. What means 04/SP ? Is it the reason ?
:=
:=Have somebody meet this problem ?
:=Thanks a lot.

Hi,

04 means the maximum frequency clock input that particular PIC is guaranteed to be able to use is 4 Mhz. With a 20 Mhz oscillator input the USART will probably not be able to keep up. Stay with the 16 Mhz if that's working, but that's still 4x the recommended frequency.

Regards,

Nikki
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515107
R.J.Hamlett
Guest







Re: 16F876 - 20 Mhz
PostPosted: Mon Jun 09, 2003 10:35 am     Reply with quote

:=I use a 16F876 with Max 232, crystal of 16 Mhz, capa of 27 pF. I write few lines of code to send characters (9600 bauds) on C6 . (#fuse HS,NOWDT,PUT,BROWNOUT,WRT,NOLVP)
:=No problems, all works fine.
:=
:=Now, if I use a crystal of 20 Mhz ( I change also the frequency in the C code ) the characters are unreadables..... Why ?
:=
:=It's not a problem with PCW ( I have test with version 3.125 and 3.160 and with two PIC ). On both PIC it's write PIC16F876-04/SP. What means 04/SP ? Is it the reason ?
:=
:=Have somebody meet this problem ?
:=Thanks a lot.

You are trying to clock the chip faster than it is designed to go, and it is probably running at an 'undertone' of the crystal frequency. Hence it is not actually running at 20MHz, and the characters come out as garbage. The '04', is the clock rate specification. It is not as 'simple', as saying that the chip will only run at 4MHz. In fact the -04 part, is guaranteed to operate at up to 4Mhz, on a 2v supply, and up to 10MHz at 3v. However the highest 'guaranteed' operating frequency (assuming you are running at 5v), is 10MHz.
If you need to operate relaibly at 20Mhz, you will need the -20 part (and this requires a supply of at least 4.5v, to operate at 20MHz).

Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515118
Detienne G.
Guest







Re: 16F876 - 20 Mhz
PostPosted: Mon Jun 09, 2003 3:30 pm     Reply with quote

:=:=I use a 16F876 with Max 232, crystal of 16 Mhz, capa of 27 pF. I write few lines of code to send characters (9600 bauds) on C6 . (#fuse HS,NOWDT,PUT,BROWNOUT,WRT,NOLVP)
:=:=No problems, all works fine.
:=:=
:=:=Now, if I use a crystal of 20 Mhz ( I change also the frequency in the C code ) the characters are unreadables..... Why ?
:=:=
:=:=It's not a problem with PCW ( I have test with version 3.125 and 3.160 and with two PIC ). On both PIC it's write PIC16F876-04/SP. What means 04/SP ? Is it the reason ?
:=:=
:=:=Have somebody meet this problem ?
:=:=Thanks a lot.
:=
:=You are trying to clock the chip faster than it is designed to go, and it is probably running at an 'undertone' of the crystal frequency. Hence it is not actually running at 20MHz, and the characters come out as garbage. The '04', is the clock rate specification. It is not as 'simple', as saying that the chip will only run at 4MHz. In fact the -04 part, is guaranteed to operate at up to 4Mhz, on a 2v supply, and up to 10MHz at 3v. However the highest 'guaranteed' operating frequency (assuming you are running at 5v), is 10MHz.
:=If you need to operate relaibly at 20Mhz, you will need the -20 part (and this requires a supply of at least 4.5v, to operate at 20MHz).
:=
:=Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515129
Detienne G.
Guest







Re: 16F876 - 20 Mhz
PostPosted: Mon Jun 09, 2003 3:38 pm     Reply with quote

:=:=I use a 16F876 with Max 232, crystal of 16 Mhz, capa of 27 pF. I write few lines of code to send characters (9600 bauds) on C6 . (#fuse HS,NOWDT,PUT,BROWNOUT,WRT,NOLVP)
:=:=No problems, all works fine.
:=:=
:=:=Now, if I use a crystal of 20 Mhz ( I change also the frequency in the C code ) the characters are unreadables..... Why ?
:=:=
:=:=It's not a problem with PCW ( I have test with version 3.125 and 3.160 and with two PIC ). On both PIC it's write PIC16F876-04/SP. What means 04/SP ? Is it the reason ?
:=:=
:=:=Have somebody meet this problem ?
:=:=Thanks a lot.
:=
:=You are trying to clock the chip faster than it is designed to go, and it is probably running at an 'undertone' of the crystal frequency. Hence it is not actually running at 20MHz, and the characters come out as garbage. The '04', is the clock rate specification. It is not as 'simple', as saying that the chip will only run at 4MHz. In fact the -04 part, is guaranteed to operate at up to 4Mhz, on a 2v supply, and up to 10MHz at 3v. However the highest 'guaranteed' operating frequency (assuming you are running at 5v), is 10MHz.
:=If you need to operate relaibly at 20Mhz, you will need the -20 part (and this requires a supply of at least 4.5v, to operate at 20MHz).
:=
:=Best Wishes


Many thanks for your answers. The data sheet for the PIC16F87X is not clear or I can't read. It is write : operating speed = DC - 20 Mhz and a voltage of 5V. for 20 Mhz. I try to find one -20 version.

I know that you are right and I estimate your opinion.
Thanks a lot.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515130
R.J.Hamlett
Guest







Re: 16F876 - 20 Mhz
PostPosted: Tue Jun 10, 2003 2:10 am     Reply with quote

:=:=:=I use a 16F876 with Max 232, crystal of 16 Mhz, capa of 27 pF. I write few lines of code to send characters (9600 bauds) on C6 . (#fuse HS,NOWDT,PUT,BROWNOUT,WRT,NOLVP)
:=:=:=No problems, all works fine.
:=:=:=
:=:=:=Now, if I use a crystal of 20 Mhz ( I change also the frequency in the C code ) the characters are unreadables..... Why ?
:=:=:=
:=:=:=It's not a problem with PCW ( I have test with version 3.125 and 3.160 and with two PIC ). On both PIC it's write PIC16F876-04/SP. What means 04/SP ? Is it the reason ?
:=:=:=
:=:=:=Have somebody meet this problem ?
:=:=:=Thanks a lot.
:=:=
:=:=You are trying to clock the chip faster than it is designed to go, and it is probably running at an 'undertone' of the crystal frequency. Hence it is not actually running at 20MHz, and the characters come out as garbage. The '04', is the clock rate specification. It is not as 'simple', as saying that the chip will only run at 4MHz. In fact the -04 part, is guaranteed to operate at up to 4Mhz, on a 2v supply, and up to 10MHz at 3v. However the highest 'guaranteed' operating frequency (assuming you are running at 5v), is 10MHz.
:=:=If you need to operate relaibly at 20Mhz, you will need the -20 part (and this requires a supply of at least 4.5v, to operate at 20MHz).
:=:=
:=:=Best Wishes
:=
:=
:=Many thanks for your answers. The data sheet for the PIC16F87X is not clear or I can't read. It is write : operating speed = DC - 20 Mhz and a voltage of 5V. for 20 Mhz. I try to find one -20 version.
:=
:=I know that you are right and I estimate your opinion.
:=Thanks a lot.
You need to look further into the data sheet. The details you are referring to, give the clock range for the entire product 'range'. If you instead look at the 'electrical characteristics' section, and look at page 152 (on my sheet), you get a series of graphs. These give the speeds for different 'sub versions', at different voltages. The first is for the 16F87x-20, then you have the 16LF87x-04, then the 16F87x-04, and finally the 16F87x-10. These are specified for the supply voltages supported, and the clock rates, over the different operating temperature ranges. The 'L' version, goes down to 2V operation, while the -20 part is shown as only supporting 16MHz, if the supply is 4V. If your sheet only mentions the 5v operation, then it is an old data sheet (dating from before the LF versions were launched). However it should still have the clock/voltage graphs for the -04, and -20 versions, since these are given, even in the very earliest sheets. They will however (obviously), be on a different page number.

Best Wishes
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515136
Detienne G.
Guest







Re: 16F876 - 20 Mhz
PostPosted: Tue Jun 10, 2003 2:58 pm     Reply with quote

I shall download the last version of the data sheet. Now it's clear for me.
Thanks a lot.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515152
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group