Hi Dirk,
Should be resolved for you now, many thanks for letting us know.
PIC18F15Q41
-
BenR
- Matrix Staff
- Posts: 1989
- http://meble-kuchenne.info.pl
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 523 times
- Been thanked: 710 times
Re: PIC18F15Q41
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: PIC18F15Q41
Hello Ben,
I have ported a project from the PIC18F14K22 to the PIC18F15Q41. All functions are OK, but the OSC speed feels like 1/10 or less. I set INTOSC to 64MHZ and inserted the C code OSCFRQ=0x08;. The problem persists. Could you create and post a small project with the settings 64MHz, Oscillator Start-up Timer on, everything else off? Which parameter is responsible for the Analog-to-Digital Converter RC Oscillator (ADCRC)? Have I overlooked something?
Thanks,
Dirk
I have ported a project from the PIC18F14K22 to the PIC18F15Q41. All functions are OK, but the OSC speed feels like 1/10 or less. I set INTOSC to 64MHZ and inserted the C code OSCFRQ=0x08;. The problem persists. Could you create and post a small project with the settings 64MHz, Oscillator Start-up Timer on, everything else off? Which parameter is responsible for the Analog-to-Digital Converter RC Oscillator (ADCRC)? Have I overlooked something?
Thanks,
Dirk
Re: PIC18F15Q41
Hello Ben,
I have flashed a chip with a small program containing the components EEProm, Serial-EEPRom (i2c), Digital Pot (i2c), PWM, and UART (Midi). The timing is OK. PWM 62.5 KHz is correct. Clock out 16 MHZ (FOSC/4) is correct. The compiler runs without errors.
PWM works, interrupts work, digital potentiometer works. Internal EEProm does not work, Midi does not work. I wrote a routine that initializes the EEprom and the Serial-EEprom and writes a specific value to a specific address of the EEprom. The next time the program starts, this address is read. If the value is correct, the EEproms are not initialized. However, the EEPROMs are initialized at every restart. The value is not written. As soon as I add the i2c component to the project, the overall speed drops dramatically. Initialization takes about 2 seconds with the PIC18F14K22, but with the 18F15Q41 it takes 20 seconds or more, and the EEPROM does not write (or read?) the value to the address.
Otherwise, it looks very good.
Best regards,
Dirk
I have flashed a chip with a small program containing the components EEProm, Serial-EEPRom (i2c), Digital Pot (i2c), PWM, and UART (Midi). The timing is OK. PWM 62.5 KHz is correct. Clock out 16 MHZ (FOSC/4) is correct. The compiler runs without errors.
PWM works, interrupts work, digital potentiometer works. Internal EEProm does not work, Midi does not work. I wrote a routine that initializes the EEprom and the Serial-EEprom and writes a specific value to a specific address of the EEprom. The next time the program starts, this address is read. If the value is correct, the EEproms are not initialized. However, the EEPROMs are initialized at every restart. The value is not written. As soon as I add the i2c component to the project, the overall speed drops dramatically. Initialization takes about 2 seconds with the PIC18F14K22, but with the 18F15Q41 it takes 20 seconds or more, and the EEPROM does not write (or read?) the value to the address.
Otherwise, it looks very good.
Best regards,
Dirk
-
medelec35
- Matrix Staff
- Posts: 2177
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 662 times
- Been thanked: 736 times
Re: PIC18F15Q41
Hi Dirk
I have just tried the internal EEPROM and no issues with read or write.
Can you just try internal EEPROM with only UART,
then add suspected component that might be causing an issue.
Then you can still see if internal EEPROM is working or not.
I have just tried the internal EEPROM and no issues with read or write.
Can you just try internal EEPROM with only UART,
then add suspected component that might be causing an issue.
Then you can still see if internal EEPROM is working or not.
Martin
Re: PIC18F15Q41
Hi Martin,
The EEPROM component does not write (or read, or both), and the MIDI component does not work. The timing problem is definitely due to the I2C component. Perhaps an (i2c)-interrupt problem? If there is no I2C component such as serial EEPROM, I2C DAC, or I2C DIGIPOT, the speed of the program seems to be correct.
regards
Dirk
The EEPROM component does not write (or read, or both), and the MIDI component does not work. The timing problem is definitely due to the I2C component. Perhaps an (i2c)-interrupt problem? If there is no I2C component such as serial EEPROM, I2C DAC, or I2C DIGIPOT, the speed of the program seems to be correct.
regards
Dirk
Re: PIC18F15Q41
Hi Martin Hi Ben,
sorry, the internal EPROM seems to be working. I forgot to reactivate the address description. The timing problem is really the
I2C component. Midi isn't working either. I activated a Midi send function, and something is being sent. But the receiver isn't responding. Seems to be the wrong baud rate. I added a flashing function with an LED. But it flashes at a completely random speed, even though all I2C components have been completely removed. I hope that helps.
Dirk
sorry, the internal EPROM seems to be working. I forgot to reactivate the address description. The timing problem is really the
I2C component. Midi isn't working either. I activated a Midi send function, and something is being sent. But the receiver isn't responding. Seems to be the wrong baud rate. I added a flashing function with an LED. But it flashes at a completely random speed, even though all I2C components have been completely removed. I hope that helps.
Dirk
-
medelec35
- Matrix Staff
- Posts: 2177
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 662 times
- Been thanked: 736 times
Re: PIC18F15Q41
Hi Dirk.
When I tested the osc frequency, I set the microcontroller to internal 64MHz.
Used a logic analyser to measure the pulse of 10ms on, 10ms off..... etc.
It was very stable and spot on.
UART and timer interrupts are spot on as well.
How have you got your setup, internal/external osc etc?
You should make sure the speed is stable before trying UART and other timed related components.
When I tested the osc frequency, I set the microcontroller to internal 64MHz.
Used a logic analyser to measure the pulse of 10ms on, 10ms off..... etc.
It was very stable and spot on.
UART and timer interrupts are spot on as well.
How have you got your setup, internal/external osc etc?
You should make sure the speed is stable before trying UART and other timed related components.
Martin
Re: PIC18F15Q41
internal osc 64Mhz
It seems that the LUT component is not working either. Instead of a sine wave, it produces a random output. An up-down counter produces a triangular signal at the output of the PWM.
It seems that the LUT component is not working either. Instead of a sine wave, it produces a random output. An up-down counter produces a triangular signal at the output of the PWM.