Author |
Message |
Topic: port_b_pullups() and PIC10F2xx |
Eddy71ua
Replies: 9
Views: 9476
|
Forum: General CCS C Discussion Posted: Sun Oct 29, 2023 7:48 am Subject: port_b_pullups() and PIC10F2xx |
GPIO port in small PIC10F controllers is called port_b, but I was confused by the fact that in the haser file the control of the port pull-up resistors is there, but you can't add it to the program |
Topic: port_b_pullups() and PIC10F2xx |
Eddy71ua
Replies: 9
Views: 9476
|
Forum: General CCS C Discussion Posted: Sat Oct 28, 2023 6:25 am Subject: port_b_pullups() and PIC10F2xx |
I'm trying in the code to apply the command
port_b_pullups(True);
for PIC10F2xx and get error message:
*** Error 12 "F:\UAV\TouchSNS\TouchSNS200.c" Line 18(15,16): U ... |
Topic: int40 to string |
Eddy71ua
Replies: 23
Views: 39251
|
Forum: General CCS C Discussion Posted: Thu Jun 22, 2023 3:16 am Subject: int40 to string |
I can't show you the code. But nothing revolutionary. The ADF4106 prescaler is used to work with the upper ranges. And of course mathematical processing of the accumulated results. |
Topic: int40 to string |
Eddy71ua
Replies: 23
Views: 39251
|
Forum: General CCS C Discussion Posted: Tue Jun 20, 2023 3:46 am Subject: int40 to string |
As a reference oscillator is used quality TCXO 10 MHz + calibration by GPS-receiver. |
Topic: int40 to string |
Eddy71ua
Replies: 23
Views: 39251
|
Forum: General CCS C Discussion Posted: Tue Jun 20, 2023 12:00 am Subject: int40 to string |
I agree, the number is very large. But modern radio communications operate on very high frequencies. Normal WiFi operates at 5,600,000,000 or so frequencies. And that doesn't fit into 32 bits...
:sa ... |
Topic: int40 to string |
Eddy71ua
Replies: 23
Views: 39251
|
Forum: General CCS C Discussion Posted: Mon Jun 19, 2023 7:56 am Subject: int40 to string |
I also thought about the loss of accuracy of int to float conversion today. I don't want to lose significant digits.
On the piclist.com site I found an assembly conversion from binary code to bcd. I ... |
Topic: int40 to string |
Eddy71ua
Replies: 23
Views: 39251
|
Forum: General CCS C Discussion Posted: Mon Jun 19, 2023 4:39 am Subject: int40 to string |
Sorry, PIC18F26k22
Now I'm thinking of limiting the input data to int32 and converting to float32, doing the math with float format |
Topic: int40 to string |
Eddy71ua
Replies: 23
Views: 39251
|
Forum: General CCS C Discussion Posted: Mon Jun 19, 2023 2:43 am Subject: int40 to string |
The program has a regular binary counter that accumulates data from the timer + adds a timer overflow and then does the averaging.
From int32 I did the conversion earlier through the itoa32() functi ... |
Topic: int40 to string |
Eddy71ua
Replies: 23
Views: 39251
|
Forum: General CCS C Discussion Posted: Sat Jun 17, 2023 11:46 pm Subject: int40 to string |
I use a PIC18 to make a frequency meter. I get the data from the assembler insert in the program as a set of 5 bytes.
I want to convert this number to BCD-format for further display on the screen. |
Topic: int40 to string |
Eddy71ua
Replies: 23
Views: 39251
|
Forum: General CCS C Discussion Posted: Sat Jun 17, 2023 6:54 am Subject: int40 to string |
Can you please tell me how to convert an 40-bit unsigned integer to a string? |
Topic: How do I put a program in memory that is not at address 0x00 |
Eddy71ua
Replies: 2
Views: 9678
|
Forum: General CCS C Discussion Posted: Sat Jan 28, 2023 5:30 am Subject: How do I put a program in memory that is not at address 0x00 |
Thanks for the tip. Never heard of this directive before. I'm going to read and understand. |
Topic: How do I put a program in memory that is not at address 0x00 |
Eddy71ua
Replies: 2
Views: 9678
|
Forum: General CCS C Discussion Posted: Sat Jan 28, 2023 1:56 am Subject: How do I put a program in memory that is not at address 0x00 |
I want to write my own little bootloader and place it on top of the PIC18 memory, placing only the jump command to the beginning of the bootloader at address zero.
Placing the #ORG directive 0x3000 m ... |
Topic: #pin_select PWM the problem |
Eddy71ua
Replies: 11
Views: 30987
|
Forum: General CCS C Discussion Posted: Wed Dec 22, 2021 1:58 am Subject: #pin_select PWM the problem |
Thank you very much.
The final PWM configuration command in my case looks like this:
setup_ccp1(CCP_PWM|CCP_PWM_HALF_BRIDGE|CCP_P1A_A5|CCP_P1B_A4); // route pwm output to A5,A4
se ... |
Topic: #pin_select PWM the problem |
Eddy71ua
Replies: 11
Views: 30987
|
Forum: General CCS C Discussion Posted: Tue Dec 21, 2021 9:20 am Subject: #pin_select PWM the problem |
Thanks for your help - now the switching of the PWM pins works.
Although my brain still has a slight misunderstanding of why the command works on some chips, while others must be accessed throug ... |
Topic: #pin_select PWM the problem |
Eddy71ua
Replies: 11
Views: 30987
|
Forum: General CCS C Discussion Posted: Tue Dec 21, 2021 4:01 am Subject: #pin_select PWM the problem |
In a project with a PIC12F1822 I want to change the assignment of the default output CCP1 to pins RA4 and RA5.
I try to use the command #pin_select:
#use fast_io(a)
#pin_select P1A=PIN_A ... |
|