Author |
Message |
Topic: Microchip Class B IEC60730 code implementation in CCS |
mvanvliet
Replies: 8
Views: 20470
|
Forum: General CCS C Discussion Posted: Wed Jan 29, 2020 5:13 am Subject: Microchip Class B IEC60730 code implementation in CCS |
The processor I would like to use for the Class B test is 16F15313 (which has CRC), which doesn't have an eeprom.
On the 16F1824 (which I've used in the past) these EEPROM register bits are findabl ... |
Topic: Microchip Class B IEC60730 code implementation in CCS |
mvanvliet
Replies: 8
Views: 20470
|
Forum: General CCS C Discussion Posted: Wed Jan 29, 2020 4:37 am Subject: Microchip Class B IEC60730 code implementation in CCS |
Thanks for your reaction. Most of the errors I receive now are the ones for the function below.
The errors for EEADR and PMADR have I solved to add
#byte EEADR = getenv("DATA_EEPROM& ... |
Topic: Microchip Class B IEC60730 code implementation in CCS |
mvanvliet
Replies: 8
Views: 20470
|
Forum: General CCS C Discussion Posted: Wed Jan 29, 2020 2:56 am Subject: Microchip Class B IEC60730 code implementation in CCS |
@temtronic: As I've read the underscore is to switch from C to ASM with the same variable in the Microchip XC8 compiler. It is defined as uint16_t CLASSB_timerCount = 0;
@PCMprogrammer: So I need t ... |
Topic: Microchip Class B IEC60730 code implementation in CCS |
mvanvliet
Replies: 8
Views: 20470
|
Forum: General CCS C Discussion Posted: Fri Jan 24, 2020 9:37 am Subject: Microchip Class B IEC60730 code implementation in CCS |
I'm trying to implement the Class B (IEC60730) files into a CCS program, I've eliminated most errors, but there are a few left which I can't solve. One of them is:
/****************************** ... |
Topic: Input pin 16F18324 |
mvanvliet
Replies: 6
Views: 18603
|
Forum: General CCS C Discussion Posted: Thu Jan 09, 2020 9:23 am Subject: Input pin 16F18324 |
We have chosen for the software based UART, therefore the Forse_SW in the #use RS232, but if all is working we could decide to use the hardware based UART again.
So is this setup_adc_ports(sAN0,sAN ... |
Topic: Input pin 16F18324 |
mvanvliet
Replies: 6
Views: 18603
|
Forum: General CCS C Discussion Posted: Thu Jan 09, 2020 5:53 am Subject: Input pin 16F18324 |
Hi Jay,
Thanks for your reaction, it could be part of the solution, but because it should be an regular input I don't think pin_select will do the job, only DAC, PWM, SPI and Interrupts are mention ... |
Topic: Input pin 16F18324 |
mvanvliet
Replies: 6
Views: 18603
|
Forum: General CCS C Discussion Posted: Thu Jan 09, 2020 4:35 am Subject: Input pin 16F18324 |
Does anyone know if the input pin A0 is changed from 16F1824 to 16F18324? This pin is used for input, but also for RS232 output, so should be switched from input to output during the program if RS232 ... |
Topic: 16F1789 with 23LC1024 SRAM over SPI |
mvanvliet
Replies: 12
Views: 30084
|
Forum: General CCS C Discussion Posted: Fri Feb 09, 2018 8:57 am Subject: 16F1789 with 23LC1024 SRAM over SPI |
It seems that your code is working correctly, thank you for your effort. |
Topic: 16F1789 with 23LC1024 SRAM over SPI |
mvanvliet
Replies: 12
Views: 30084
|
Forum: General CCS C Discussion Posted: Thu Feb 08, 2018 8:58 am Subject: 16F1789 with 23LC1024 SRAM over SPI |
#include <16F1789.H>
#Fuses HS,NOWDT
#Fuses NOPUT,MCLR,NOPROTECT,NOCPD,BROWNOUT
#Fuses NOCLKOUT,NOIESO
#Fuses NOFCMEN,NOWRT,NOVCAP
#Fuses PLL_SW,NOSTVREN,NOLPBOR,NODEBUG
#Fuses NOLVP
... |
Topic: 16F1789 with 23LC1024 SRAM over SPI |
mvanvliet
Replies: 12
Views: 30084
|
Forum: General CCS C Discussion Posted: Thu Feb 08, 2018 3:03 am Subject: 16F1789 with 23LC1024 SRAM over SPI |
Note how I wait for the _return_ on the last write.
Thank you for your reaction, can you explain your 'return' a bit more, is it
dummy=SPI_xfer(0x11,8); //send 8 bit Data this part wha ... |
Topic: 16F1789 with 23LC1024 SRAM over SPI |
mvanvliet
Replies: 12
Views: 30084
|
Forum: General CCS C Discussion Posted: Wed Feb 07, 2018 8:06 am Subject: 16F1789 with 23LC1024 SRAM over SPI |
Ok, this part is working, but now the second step, use the sequential mode of the sram to write a lot of bytes into the sram.
So I first changed the "byte" to "sequential" mode: ... |
Topic: 16F1789 with 23LC1024 SRAM over SPI |
mvanvliet
Replies: 12
Views: 30084
|
Forum: General CCS C Discussion Posted: Mon Feb 05, 2018 9:44 am Subject: 16F1789 with 23LC1024 SRAM over SPI |
Yes you were both right. Mode=0 solved my problem. Thanks! |
Topic: 16F1789 with 23LC1024 SRAM over SPI |
mvanvliet
Replies: 12
Views: 30084
|
Forum: General CCS C Discussion Posted: Mon Feb 05, 2018 6:47 am Subject: 16F1789 with 23LC1024 SRAM over SPI |
The MODE option is more or less a quick way to specify how the
stream is going to sample data. MODE=0 sets IDLE=0 and
SAMPLE_RISE. MODE=1 sets IDLE=0 and SAMPLE_FALL.
MODE=2 sets IDLE=1 and SAMPLE_ ... |
Topic: 16F1789 with 23LC1024 SRAM over SPI |
mvanvliet
Replies: 12
Views: 30084
|
Forum: General CCS C Discussion Posted: Mon Feb 05, 2018 5:27 am Subject: 16F1789 with 23LC1024 SRAM over SPI |
I'm trying to communicate with a 16F1789 with an Sram 23LC1024, but it will not be working as expected. Maybe one of you know what is wrong.
Compiler: V5.062
Simplified code:
#include <1 ... |
Topic: Random reset 16F1503 |
mvanvliet
Replies: 6
Views: 16845
|
Forum: General CCS C Discussion Posted: Wed Jul 12, 2017 2:48 am Subject: Random reset 16F1503 |
Thanks for all the answers. We tried the reset_cause in the past but it was mentioned as an "NORMAL_POWER_UP". |
|