PIC et CCS C

D

david90

Guest
Quote:

# include <16F688.h>

# use delay (clock = 8000000)

# fusibles INTRC_IO, NOWDT, NOPROTECT, NOPUT

void main ()

(

int a;

setup_oscillator (OSC_8MHZ | OSC_INTRC);

Setup_adc_ports (sAN0);

Setup_adc (ADC_CLOCK_INTERNAL);

a = READ_ADC ();)
 
peu d'aide?Comment puis-je configurer un PIC d'utiliser ses 8MHZ horloge interne avec CCS C?

 
Salut,

Il suffit d'aller à ce forum de Nice:

http://www.ccsinfo.com/forum/vous obtiendrez heureux ...
Dernière édition par hugo le 28 Feb 2006 2:45; édité 1 fois au total

 
# include <16F688.h>
# device adc = 10
# use delay (clock = 8000000)
# fusibles INTRC_IO, NOWDT, NOPROTECT, NOPUT
int16 a;
void main () (
set_tris_a (0b00000001);
Setup_adc_ports (sAN0);
Setup_adc (ADC_CLOCK_INTERNAL);

while (true) (

set_adc_channel (0);
a = READ_ADC ();
delay_ms (10);

))

 

Welcome to EDABoard.com

Sponsor

Back
Top