Author |
Message |
Topic: setting the adc clock in pic18f452 pcb 4.110 |
louwi_138
Replies: 7
Views: 10306
|
Forum: General CCS C Discussion Posted: Sat Nov 30, 2013 12:36 am Subject: setting the adc clock in pic18f452 pcb 4.110 |
You have to wait after changing the channel before you can read the ADC. Check your datasheet to see the minimum wait time.
Regards
yes it was that the problem. thank you. |
Topic: setting the adc clock in pic18f452 pcb 4.110 |
louwi_138
Replies: 7
Views: 10306
|
Forum: General CCS C Discussion Posted: Fri Nov 29, 2013 9:40 pm Subject: setting the adc clock in pic18f452 pcb 4.110 |
Have you run a simple 'read adc and display the data' program ?
Just a simple program to read each sensor and send to PC or LCD to confirm the sensors do work as expected?
You could easily have a wi ... |
Topic: setting the adc clock in pic18f452 pcb 4.110 |
louwi_138
Replies: 7
Views: 10306
|
Forum: General CCS C Discussion Posted: Fri Nov 29, 2013 8:07 pm Subject: setting the adc clock in pic18f452 pcb 4.110 |
It's always the same problem :
#include <18f452.h>
#DEVICE ADC=8
#FUSES H4 //This is HS, with 4* PLL - H4 config bit.....
#fuses NOWDT
#use delay(clock=40M)
void config_adc ... |
Topic: setting the adc clock in pic18f452 pcb 4.110 |
louwi_138
Replies: 7
Views: 10306
|
Forum: General CCS C Discussion Posted: Fri Nov 29, 2013 12:56 am Subject: setting the adc clock in pic18f452 pcb 4.110 |
Hi,
I'm running my pic18F452 with an oscillator 10MHZ and I activate the pll which makes the pic run at 40Mhz.
But I noticed that the adc converter is not working well. I'm reading the analog data f ... |
Topic: Running pic18f452 with 3.3V ; CCS PCB 4.110 |
louwi_138
Replies: 3
Views: 6473
|
Forum: General CCS C Discussion Posted: Thu Oct 31, 2013 3:44 am Subject: Running pic18f452 with 3.3V ; CCS PCB 4.110 |
No. Just change the PIC......
Read the data sheet. The 18F452, _minimum_ operating voltage is 4.2v.
The 18LF452 (note the extra character), is rated to run to about 25MHz at this voltage, but th ... |
Topic: Running pic18f452 with 3.3V ; CCS PCB 4.110 |
louwi_138
Replies: 3
Views: 6473
|
Forum: General CCS C Discussion Posted: Wed Oct 30, 2013 9:47 pm Subject: Running pic18f452 with 3.3V ; CCS PCB 4.110 |
Hello,
I'm trying to run my pic with voltage 3.3V. I'm wondering if there is anything to add in the code before using it with 3.3V. |
Topic: atan error |
louwi_138
Replies: 7
Views: 11474
|
Forum: General CCS C Discussion Posted: Tue Oct 08, 2013 7:34 pm Subject: atan error |
It's work fine,
here is the solution for this problem I tested it and it work (it's the own of Ttelmah ) :
float angle(float X, float Y)
{
//routine to give a fast solution for a ... |
Topic: atan error |
louwi_138
Replies: 7
Views: 11474
|
Forum: General CCS C Discussion Posted: Tue Oct 08, 2013 2:04 pm Subject: atan error |
Are you calculating back from a division?. If so, look at atan2. This performs better at the extreme values (0, and infinity).
Also for speed, I have posted a much faster approximation (a search for ... |
Topic: atan error |
louwi_138
Replies: 7
Views: 11474
|
Forum: General CCS C Discussion Posted: Tue Oct 08, 2013 12:20 pm Subject: atan error |
Hello,
I need to calculate some angle by the use of atan but this one is not stabel always in fact after debuging I noteced that it's make for some input an error = 3° witch cause a huge bad effect ... |
Topic: RS232 hardware configuration // PIC18f452 // picc PCB 4.110 |
louwi_138
Replies: 5
Views: 7569
|
Forum: General CCS C Discussion Posted: Fri Sep 13, 2013 4:19 am Subject: RS232 hardware configuration // PIC18f452 // picc PCB 4.110 |
Just use #use RS232.
Directly setting register is not really the way that CCS is designed to work.
I know that but it wil not activate the hardware module cause it's a software solution since I ca ... |
Topic: RS232 hardware configuration // PIC18f452 // picc PCB 4.110 |
louwi_138
Replies: 5
Views: 7569
|
Forum: General CCS C Discussion Posted: Fri Sep 13, 2013 12:56 am Subject: RS232 hardware configuration // PIC18f452 // picc PCB 4.110 |
Hello,
I configured my pic as PLL active with 10MHz witch make it run at 40MHz
but when I tested the communication it don't work as it should be.
I think that the baud was not well configured.
Thi ... |
Topic: Wireless communication |
louwi_138
Replies: 3
Views: 5787
|
Forum: General CCS C Discussion Posted: Tue Apr 02, 2013 12:31 am Subject: Wireless communication |
Hello,
I'm working these days with a low cost wireless communication like the "XY-MK-5v" so I tried to make the receiver in the RX pin of the microcontroller and the Transmitter pin in the ... |
Topic: program chip error ; pic16f628A ; picc 4.110 PCB |
louwi_138
Replies: 3
Views: 5358
|
Forum: General CCS C Discussion Posted: Wed Feb 13, 2013 3:39 am Subject: program chip error ; pic16f628A ; picc 4.110 PCB |
Different PIC.....
Without looking any further, what are the register addresses for PORTA, B etc., on the PIC16. Not the same as on a PIC18 (which the code is written for.....).
Take advantage of ... |
Topic: program chip error ; pic16f628A ; picc 4.110 PCB |
louwi_138
Replies: 3
Views: 5358
|
Forum: General CCS C Discussion Posted: Tue Feb 12, 2013 12:31 am Subject: program chip error ; pic16f628A ; picc 4.110 PCB |
I tried to write this code after compilation in my pic but it didn't work !
I cheked my hardware by an other code it work fine. so it's software error.
#include <16f628A.h>
#FUSES NOWDT ... |
Topic: pic 16f628 | picc v4.110 PCB | use of two pins RA6 and RA7 |
louwi_138
Replies: 9
Views: 13861
|
Forum: General CCS C Discussion Posted: Thu Jan 24, 2013 4:39 am Subject: pic 16f628 | picc v4.110 PCB | use of two pins RA6 and RA7 |
Of course they won't: with your code all IOs will remain as inputs. In CCS C by default, the compiler sets IO direction: so called standard I/O mode. You are manually setting IO direction using TRIS. ... |
|