Author |
Message |
Topic: Problem with Timer1 [SOLVED] |
lcs
Replies: 2
Views: 10235
|
Forum: General CCS C Discussion Posted: Wed Jul 01, 2020 2:33 pm Subject: Problem with Timer1 [SOLVED] |
One issue I can immediately see is that you are using int for your ticks, which is an 8 bit value. That only will go up to 255 and then roll over to zero. Therefore you never reach 1000. You need to u ... |
Topic: Problem with Timer1 [SOLVED] |
lcs
Replies: 2
Views: 10235
|
Forum: General CCS C Discussion Posted: Wed Jul 01, 2020 2:11 pm Subject: Problem with Timer1 [SOLVED] |
Hello everyone, i tried to use timer1 module of pic, but isn't work.
I tried to make a blink led with 1Hz of frequency:
t = (4 * 8 * (65536-65411)) / 4.10^6 = 1ms
#include <16f676.h>
... |
Topic: PIC12F683 with VRef in ADC [SOLVED] |
lcs
Replies: 13
Views: 27495
|
Forum: General CCS C Discussion Posted: Thu Mar 12, 2020 6:16 pm Subject: PIC12F683 with VRef in ADC [SOLVED] |
The code finally worked! I thank everyone for their help and the time they spent helping me.
The changes:
#include <12F683.h>
#device adc=10
#FUSES NOWDT, INTRC_IO, NOCPD, NOPROTECT, NOM ... |
Topic: PIC12F683 with VRef in ADC [SOLVED] |
lcs
Replies: 13
Views: 27495
|
Forum: General CCS C Discussion Posted: Thu Mar 12, 2020 5:41 am Subject: PIC12F683 with VRef in ADC [SOLVED] |
In the last code of my answer, I directly tested the ADC value ... Apparently, read_adc() did not return a value greater than 0. Is the Adc module having problems?
When I get home, I will test the co ... |
Topic: PIC12F683 with VRef in ADC [SOLVED] |
lcs
Replies: 13
Views: 27495
|
Forum: General CCS C Discussion Posted: Wed Mar 11, 2020 6:53 pm Subject: PIC12F683 with VRef in ADC [SOLVED] |
Thanks for the answers.
I made some changes to my code, but the led doesn't turn on:
#include <12F683.h>
#device adc=10
#FUSES NOWDT, INTRC_IO, NOCPD, NOPROTECT, NOMCLR, PUT, NOBROWNOUT, ... |
Topic: PIC12F683 with VRef in ADC [SOLVED] |
lcs
Replies: 13
Views: 27495
|
Forum: General CCS C Discussion Posted: Tue Mar 10, 2020 8:14 pm Subject: PIC12F683 with VRef in ADC [SOLVED] |
Hi!
I'm trying to make a code to use the lm35 with pic12f683, using Vref (AN1) = 1.2V (with potentiometer). For testing, I'm just trying to light a led when the temperature exceeds 27C. What could be ... |
|