bonjour je voudrais utiliser le PIC18F46K20 car il fonctionne sous 3V3 et a beaucoup de mémoire.
Seulement voilà, je n'arrive même pas à faire clignoter une led.
Le problème vient peut-être de la configuration du PIC????
ci-joint le programme et la photo capture de la config.
Pouvez-vous m'aider? j'ai Flowcode 6.1.3.2 Pro
programme PIC18F46K20
Moderator: Benj
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: programme PIC18F46K20
salut
Votre config est configuré pour utiliser un cristal externe, utilisez-vous un?
Hi
Your config is set to use an external crystal, are you using one?
Votre config est configuré pour utiliser un cristal externe, utilisez-vous un?
Hi
Your config is set to use an external crystal, are you using one?
-
- Flowcode V4 User
- Posts: 58
- Joined: Mon Aug 16, 2010 12:52 am
- Been thanked: 1 time
- Contact:
Re: programme PIC18F46K20
oui j'ai testé avec un quartz de 48MHz et un de 20MHz + 2 capacités de 22pF
Et il faut utilisé PLL pour multiplier la fréquence par 4 pour avoir la fréquence maximale de 64MHz.
Quand pensez-vous ?
Voici la partie de la datasheet qui parle de ça.
2.6 PLL Frequency Multiplier
A Phase Locked Loop (PLL) circuit is provided as an
option for users who wish to use a lower frequency
oscillator circuit or to clock the device up to its highest
rated frequency from the crystal oscillator. This may be
useful for customers who are concerned with EMI due
to high-frequency crystals or users who require higher
clock speeds from an internal oscillator. There are
three conditions when the PLL can be used:
• When the primary clock is HSPLL
• When the primary clock is HFINTOSC and the
selected frequency is 16 MHz
• When the primary clock is HFINTOSC and the
selected frequency is 8 MHz
2.6.1 HSPLL OSCILLATOR MODE
The HSPLL mode makes use of the HS mode oscillator
for frequencies up to 16 MHz. A PLL then multiplies the
oscillator output frequency by 4 to produce an internal
clock frequency up to 64 MHz. The PLLEN bit of the
OSCTUNE register is active only when the HFINTOSC
is the primary clock and is not available in HSPLL oscillator
mode.
Il se peut que c'est là le problème. En lisant la datasheet ( qui est très compliqué à comprendre pour moi ) les quartz utilisés sont au maximum de 16MHz ?????? Et il faut utilisé PLL pour multiplier la fréquence par 4 pour avoir la fréquence maximale de 64MHz.
Quand pensez-vous ?
Voici la partie de la datasheet qui parle de ça.
2.6 PLL Frequency Multiplier
A Phase Locked Loop (PLL) circuit is provided as an
option for users who wish to use a lower frequency
oscillator circuit or to clock the device up to its highest
rated frequency from the crystal oscillator. This may be
useful for customers who are concerned with EMI due
to high-frequency crystals or users who require higher
clock speeds from an internal oscillator. There are
three conditions when the PLL can be used:
• When the primary clock is HSPLL
• When the primary clock is HFINTOSC and the
selected frequency is 16 MHz
• When the primary clock is HFINTOSC and the
selected frequency is 8 MHz
2.6.1 HSPLL OSCILLATOR MODE
The HSPLL mode makes use of the HS mode oscillator
for frequencies up to 16 MHz. A PLL then multiplies the
oscillator output frequency by 4 to produce an internal
clock frequency up to 64 MHz. The PLLEN bit of the
OSCTUNE register is active only when the HFINTOSC
is the primary clock and is not available in HSPLL oscillator
mode.
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: programme PIC18F46K20
Yes, looks like it, page 32 ...
PLL enabled for HFINTOSC (8 MHz and 16 MHz only)
Oui, regarde comme elle, la page 32 ...
PLL activé pour HFINTOSC (8 MHz et 16 MHz seulement)
PLL enabled for HFINTOSC (8 MHz and 16 MHz only)
Oui, regarde comme elle, la page 32 ...
PLL activé pour HFINTOSC (8 MHz et 16 MHz seulement)
-
- Flowcode V4 User
- Posts: 58
- Joined: Mon Aug 16, 2010 12:52 am
- Been thanked: 1 time
- Contact:
Re: programme PIC18F46K20
j'ai enfin reçu le crystal 16MHz. j'ai testé ce programme :
Donc l'écran s'éclaire mais pas en couleur. le rectangle ne s'affiche pas.
Remarque : j'ai un crystal de 16MHz et j'utilise le HSPPL enable 4x fosc1. je devrais donc fonctionner à 64MHz. juste ou pas????
que dois-je mettre dans la configuration des fusibles comme valeur du crystal? Il n'y a pas 16MHz ni 64MHz ????
Merci de m'aider
seule la fonction BackligthOn fonctionne (après 3 secondes). + la led qui clignote toutes les unes secondes.Donc l'écran s'éclaire mais pas en couleur. le rectangle ne s'affiche pas.
Remarque : j'ai un crystal de 16MHz et j'utilise le HSPPL enable 4x fosc1. je devrais donc fonctionner à 64MHz. juste ou pas????
que dois-je mettre dans la configuration des fusibles comme valeur du crystal? Il n'y a pas 16MHz ni 64MHz ????
Merci de m'aider