Author |
Message |
Topic: 18F25K80 CAN Transmit issue |
2xhp
Replies: 4
Views: 5570
|
Forum: General CCS C Discussion Posted: Sat Dec 30, 2023 12:12 pm Subject: 18F25K80 CAN Transmit issue |
Hi Ttelmah - thank you for the response.
Your first question hit the nail on the head. I have used the same setup for so long that when I changed from the 10 MHz crystal to an 8 MHz oscillator, I d ... |
Topic: 18F25K80 CAN Transmit issue |
2xhp
Replies: 4
Views: 5570
|
Forum: General CCS C Discussion Posted: Fri Dec 29, 2023 7:40 pm Subject: 18F25K80 CAN Transmit issue |
I'm using an 18F25K80 with PCH 5.105 and attempting to do what I've done before with this version of compiler and the same chip - even using the same basic code. I did change from the MCP2551 CAN tran ... |
Topic: setup_adc and ADC_CLOCK_INTERNAL |
2xhp
Replies: 4
Views: 16535
|
Forum: General CCS C Discussion Posted: Tue Apr 27, 2021 6:24 pm Subject: setup_adc and ADC_CLOCK_INTERNAL |
Sounds like the acquisition time isn't sufficient. This is the time between connecting the A/D channel and when conversion actually begins. It needs to be sufficiently long to allow the PIC's internal ... |
Topic: setup_adc and ADC_CLOCK_INTERNAL |
2xhp
Replies: 4
Views: 16535
|
Forum: General CCS C Discussion Posted: Tue Apr 27, 2021 6:22 pm Subject: setup_adc and ADC_CLOCK_INTERNAL |
According to the 18F25K80 data sheet, the correct divisor for 40 MHz is 32.
I was able to make an 18F46K80 give correct A/D results by adding
the ADC_TAD_MUL_20 parameter to setup_adc(). See the ... |
Topic: setup_adc and ADC_CLOCK_INTERNAL |
2xhp
Replies: 4
Views: 16535
|
Forum: General CCS C Discussion Posted: Tue Apr 27, 2021 5:58 pm Subject: setup_adc and ADC_CLOCK_INTERNAL |
I'm running a 18F25K80 at 40 MHz (10 MHz crystal with 4x PLL). So I chose initially ADC_CLOCK_DIV_64. The readings were correct at some points, but as the input voltage to the ADC got closer to Vdd (V ... |
Topic: Command line compiler and hex files to their own folder |
2xhp
Replies: 6
Views: 19768
|
Forum: General CCS C Discussion Posted: Mon Apr 26, 2021 11:23 am Subject: Command line compiler and hex files to their own folder |
When calling the ccsc command, you can give an out="outputPath" argument. From what I understand it doesn't always work, but it has worked for me in the past. It is in the manual under argum ... |
Topic: Command line compiler and hex files to their own folder |
2xhp
Replies: 6
Views: 19768
|
Forum: General CCS C Discussion Posted: Mon Apr 26, 2021 11:21 am Subject: Command line compiler and hex files to their own folder |
You can do it with a batch file.
That's what I ended up doing - thanks for the suggestion. This allows me to move the various output file types to their own folders which is useful. For anyone inte ... |
Topic: erase_program_memory on dsPIC33 and delay between |
2xhp
Replies: 9
Views: 22957
|
Forum: General CCS C Discussion Posted: Wed Apr 21, 2021 12:52 am Subject: erase_program_memory on dsPIC33 and delay between |
OK. Did an experiment.
Have you tried in an actual chip?.
Yes, the tests above were all with an actual chip using MPLAB X IPE v5.30 with a PICKIT4 to read out the chip after I ran the tests.
... |
Topic: Command line compiler and hex files to their own folder |
2xhp
Replies: 6
Views: 19768
|
Forum: General CCS C Discussion Posted: Tue Apr 20, 2021 11:33 pm Subject: Command line compiler and hex files to their own folder |
From what this post says:
http://www.ccsinfo.com/forum/viewtopic.php?t=53421
... it doesn't sound like this is possible. Interested to hear if maybe someone knows some way to do it though. |
Topic: Command line compiler and hex files to their own folder |
2xhp
Replies: 6
Views: 19768
|
Forum: General CCS C Discussion Posted: Tue Apr 20, 2021 11:27 pm Subject: Command line compiler and hex files to their own folder |
Hi,
I looked through the manual and couldn't see an obvious option (I probably just missed it if there is one). I'd like to create a subfolder to my code and have the command line compiler on compi ... |
Topic: erase_program_memory on dsPIC33 and delay between |
2xhp
Replies: 9
Views: 22957
|
Forum: General CCS C Discussion Posted: Mon Apr 19, 2021 10:41 am Subject: erase_program_memory on dsPIC33 and delay between |
The erase code uses a 16bit address. If you look at the data sheet, you
cannot erase on a byte boundary, on on 16 bit addresses. Hence the byte
address is divided by 2 to give a 16bit address.
I ... |
Topic: erase_program_memory on dsPIC33 and delay between |
2xhp
Replies: 9
Views: 22957
|
Forum: General CCS C Discussion Posted: Sat Apr 17, 2021 8:30 pm Subject: erase_program_memory on dsPIC33 and delay between |
I discovered looking in the virtual_eeprom.c driver file where it looks like the FLASH_ERASE_SIZE is being divided by 2 for PCD devices:
#if defined(__PCH__)
#define _VE_BPA 1
#else
... |
Topic: erase_program_memory on dsPIC33 and delay between |
2xhp
Replies: 9
Views: 22957
|
Forum: General CCS C Discussion Posted: Sat Apr 17, 2021 5:44 pm Subject: erase_program_memory on dsPIC33 and delay between |
By dividing by 2, you are performing two erases per page. Each erase uses
up a 'life' on this page, so you will kill the chip in half the time that would
otherwise happen....
It is possible ... |
Topic: erase_program_memory on dsPIC33 and delay between |
2xhp
Replies: 9
Views: 22957
|
Forum: General CCS C Discussion Posted: Fri Apr 16, 2021 4:37 pm Subject: erase_program_memory on dsPIC33 and delay between |
I'm trying to do a bulk erase of a chunk of memory on a dsPIC33EV256GM104. I've found that if I do successive erases without a delay, the chip resets. I'm staying far away from the config words.
f ... |
Topic: write_program_memory on 18F25K80 not working |
2xhp
Replies: 4
Views: 14454
|
Forum: General CCS C Discussion Posted: Wed Apr 14, 2021 8:49 pm Subject: write_program_memory on 18F25K80 not working |
Hmm ... looks like I don't have a NOWRT fuse option. Any other ways to get that set correctly short of upgrading the compiler version?
I just answered my own question:
#FUSES 7=0x400F
I'll ... |
|