Author |
Message |
Topic: frequency of lc oscillator |
gaugeguy
Replies: 20
Views: 972
|
Forum: General CCS C Discussion Posted: Fri Jan 03, 2025 10:21 am Subject: frequency of lc oscillator |
sifirzero1,
Have you ever written code for a PIC processor before?
You seem to not have an understanding of the processor operation or programming. |
Topic: frequency of lc oscillator |
gaugeguy
Replies: 20
Views: 972
|
Forum: General CCS C Discussion Posted: Tue Dec 31, 2024 11:14 am Subject: frequency of lc oscillator |
You can count the number of cycles received in a set amount of time or you can measure the time for one or move cycles to complete.
Since you haven't answered the previous requests for details the ... |
Topic: DSPIC30F4011 RS232 random character problem. |
gaugeguy
Replies: 5
Views: 707
|
Forum: General CCS C Discussion Posted: Thu Dec 26, 2024 12:28 pm Subject: DSPIC30F4011 RS232 random character problem. |
Why did you choose an internal=100MHz setting?
Have you looked at the data sheet to determine what settings are possible? |
Topic: Switch from PCI16F1938 to PIC16F18857 not working |
gaugeguy
Replies: 12
Views: 3825
|
Forum: General CCS C Discussion Posted: Tue Oct 29, 2024 12:33 pm Subject: Switch from PCI16F1938 to PIC16F18857 not working |
In the PIC16F1938 Timer0 is 8 bit.
In the PIC16F18857 Timer0 is 16 bit. |
Topic: Switch from PCI16F1938 to PIC16F18857 not working |
gaugeguy
Replies: 12
Views: 3825
|
Forum: General CCS C Discussion Posted: Mon Oct 28, 2024 11:38 am Subject: Switch from PCI16F1938 to PIC16F18857 not working |
#fuses is processor specific. You must manually change it to match the new processor.
#use delay can be used to set up the clock input without needing the #fuse directive.
#use delay(clock=4M, ... |
Topic: PIC24F Clock frequency multiply problem |
gaugeguy
Replies: 4
Views: 2411
|
Forum: General CCS C Discussion Posted: Fri Sep 20, 2024 5:53 am Subject: PIC24F Clock frequency multiply problem |
With that processor, the CPU can only run at up to 32MHz. The PLL can be used to get 48MHz for the USB.
You cannot run the processor at 64MHz. |
Topic: Compiler implements hardware Uart or not? |
gaugeguy
Replies: 12
Views: 4835
|
Forum: General CCS C Discussion Posted: Wed Sep 11, 2024 1:53 pm Subject: Compiler implements hardware Uart or not? |
Look at the C/ASM list file. |
Topic: Total beginner - problem with printf missing characters |
gaugeguy
Replies: 5
Views: 2839
|
Forum: General CCS C Discussion Posted: Wed Sep 11, 2024 12:42 pm Subject: Total beginner - problem with printf missing characters |
You should never allow your program to reach the end of the main. Add a while(1); before the closing brace of main.
main()
{
printf("Hello World");
printf ... |
Topic: dspic33EP with external clock source |
gaugeguy
Replies: 2
Views: 2044
|
Forum: General CCS C Discussion Posted: Wed Sep 04, 2024 9:51 am Subject: dspic33EP with external clock source |
I don't have that part, but probably use the setup_oscillator function and let it set the fuses.
setup_oscillator(OSC_CLOCK, 20M, 140M); |
Topic: Capture Mode Input Frequency Measurement |
gaugeguy
Replies: 28
Views: 10436
|
Forum: General CCS C Discussion Posted: Wed Sep 04, 2024 7:13 am Subject: Capture Mode Input Frequency Measurement |
Guaranteed correct operation of all peripherals will be less than one clock cycle.
YMMV |
Topic: ex_use_capture.c - capture of a semi-cycle Pulse Width |
gaugeguy
Replies: 9
Views: 5134
|
Forum: General CCS C Discussion Posted: Wed Aug 14, 2024 9:37 am Subject: ex_use_capture.c - capture of a semi-cycle Pulse Width |
I am not giving you code, just some direction.
capture a rising edge, save as Rising1
capture a falling edge, save as Falling1
capture a rising edge, save as Rising2
time high = Falling1 - Ris ... |
Topic: ex_use_capture.c - capture of a semi-cycle Pulse Width |
gaugeguy
Replies: 9
Views: 5134
|
Forum: General CCS C Discussion Posted: Wed Aug 14, 2024 8:29 am Subject: ex_use_capture.c - capture of a semi-cycle Pulse Width |
A full cycle has three time readings, not just two.
Rising edge, falling edge, & rising edge
or falling edge, rising edge, & falling edge. |
Topic: ex_use_capture.c - capture of a semi-cycle Pulse Width |
gaugeguy
Replies: 9
Views: 5134
|
Forum: General CCS C Discussion Posted: Wed Aug 14, 2024 6:15 am Subject: ex_use_capture.c - capture of a semi-cycle Pulse Width |
Your code is currently capturing every rising edge of the signal. If you want to measure the time high or time low you will need to capture both the rising edge and the falling edge.
You can either ... |
Topic: General advice - first time programmer |
gaugeguy
Replies: 26
Views: 13356
|
Forum: General CCS C Discussion Posted: Thu Aug 08, 2024 1:25 pm Subject: General advice - first time programmer |
Not in a properly written program.
10ms is a long time from a microprocessors view.
200ms is a short time from a human response view. |
Topic: General advice - first time programmer |
gaugeguy
Replies: 26
Views: 13356
|
Forum: General CCS C Discussion Posted: Thu Aug 08, 2024 11:25 am Subject: General advice - first time programmer |
To debounce a switch input you would not use an external interrupt or a change interrupt at all. Just poll the pin input at a regular interval and look for a stable change of state.
An interrupt on ... |
|