Hi Martin and everyone
In one of my projects, I changed the micro for memory capacity problems:
from PIC16LF18325 to PIC16LF18426.
Unfortunately, the RXINT0 UART interrupt no longer works
and even the ADC is not working
The compiler gives me the following error:
https://www.matrixtsl.com
Avvio del compilatore...
C:\Program Files (x86)\Flowcode v8\pic\batch\pic_xc8_2.20_comp.bat 16LF18426 "C:\Users\BRUNOS~1\Desktop\SENSOR~1\Test\" "Extensometer _NTC_Pic16LF18426_1.0"
C:\Users\BRUNOS~1\Desktop\SENSOR~1\Test>"C:\Program Files\Microchip\xc8\v2.20\bin\xc8-cc.exe" -mcpu=16LF18426 "Extensometer _NTC_Pic16LF18426_1.0.c" -w=359,1273,1388 -fshort-float -fshort-double -std=c90 -Os
Extensometer_NTC_Pic16LF18426_1.0.c16: error: (255) not a member of the struct/union ""
Extensometer_NTC_Pic16LF18426_1.0.c19: error: (182) illegal conversion between types
int -> volatile union S893
Extensometer_NTC_Pic16LF18426_1.0.c20: error: (255) not a member of the struct/union ""
Extensometer_NTC_Pic16LF18426_1.0.c40: error: (255) not a member of the struct/union ""
Extensometer_NTC_Pic16LF18426_1.0.c41: error: (199) logical type required
NOT volatile union S875
Extensometer _NTC_Pic16LF18426_1.0.c41: error: (199) logical type required
NOT volatile union S893
Extensometer_NTC_Pic16LF18426_1.0.c16: error: (255) not a member of the struct/union ""
Extensometer_NTC_Pic16LF18426_1.0.c19: error: (182) illegal conversion between types
int -> volatile union S875
(908) exit status = 1
Error returned from [xc8.exe]
C:\Program Files (x86)\Flowcode v8\pic\batch\pic_xc8_2.20_comp.bat ha riportato il codice di errore 1
Autoclose turned off
I read, from the datasheet, that the UART interrupt is enabled by the PIE3 register and not the PIE1 register.
"// Name: Interrupt, Type: Interrupt: Enable RXINT0
st_bit (INTCON, GIE);
st_bit (PIE1, RCIE);
st_bit (INTCON, PEIE); "
For the ADC, on the other hand, I can't understand
Can you help me solve the problem?
Thank you very much
best regards
PIC16LF18426 does not work correctly
Moderator: Benj
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: PIC16LF18426 does not work correctly
Hi Bruno.
Just regarding UART interrupt
Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.
C:\ProgramData\MatrixTSL\FlowcodeV8\FCD\PIC
Replace the existing file with the attached file.
If Flowcode was running when you replaced the file, you will need to reload your flowchart.
Just regarding UART interrupt
Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.
C:\ProgramData\MatrixTSL\FlowcodeV8\FCD\PIC
Replace the existing file with the attached file.
If Flowcode was running when you replaced the file, you will need to reload your flowchart.
- Attachments
-
- 16LF18426.fcdx
- (27.81 KiB) Downloaded 178 times
Martin
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: PIC16LF18426 does not work correctly
Hi Regarding ADC,
Can you see if the attached file works better?
The same as above post, but this time the file belongs:
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC
Edit: Removed file as not working.
Can you see if the attached file works better?
The same as above post, but this time the file belongs:
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC
Edit: Removed file as not working.
Martin
Re: PIC16LF18426 does not work correctly
Hi Martin
Thank you for your help
Next Monday I'll take a test and let you know.
Have a nice week end
Thank you for your help
Next Monday I'll take a test and let you know.
Have a nice week end
Re: PIC16LF18426 does not work correctly
Hi Martin
I have tested your modification, and the interrupt problem is solved.
On the other hand, as far as the ADC is concerned, it didn't work due to my configuration error, so I solved it.
I have tested your CAL_ADC.c file and it is not working correctly.
I point out that the micro in question has 4 timers 8bit and 4 timers 16bit, but in the interrupt property there are only three as shown in the attached photo. Why are the other timers not available?
thanks for your time
best regards
I have tested your modification, and the interrupt problem is solved.
On the other hand, as far as the ADC is concerned, it didn't work due to my configuration error, so I solved it.
I have tested your CAL_ADC.c file and it is not working correctly.
I point out that the micro in question has 4 timers 8bit and 4 timers 16bit, but in the interrupt property there are only three as shown in the attached photo. Why are the other timers not available?
thanks for your time
best regards
- Attachments
-
- Interrupt.jpg (26.48 KiB) Viewed 4221 times