Gday
Having a bit of bother getting my 16 x 2 LCD to work with 18F24K20. I have tried different combinations to no avail. Could someone have a look and see where what I am missing please.
Cheers
John
LCD 18F45K20
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: LCD 18F45K20
Hi John,
Ok first of all I would disable the Extended CPU option in the configuration as this is known to cause issues with string variables.
Also the internal RC clock speed defaults to 1MHz not the currently specified 10MHz.
You can change the internal RC oscillator frequency to the following by adding a C code icon to the start of your program and adding one of the lines of code specified.
16MHz : osccon = (osccon & 0x8F) | 0x70;
08MHz : osccon = (osccon & 0x8F) | 0x60;
04MHz : osccon = (osccon & 0x8F) | 0x50;
Ok first of all I would disable the Extended CPU option in the configuration as this is known to cause issues with string variables.
Also the internal RC clock speed defaults to 1MHz not the currently specified 10MHz.
You can change the internal RC oscillator frequency to the following by adding a C code icon to the start of your program and adding one of the lines of code specified.
16MHz : osccon = (osccon & 0x8F) | 0x70;
08MHz : osccon = (osccon & 0x8F) | 0x60;
04MHz : osccon = (osccon & 0x8F) | 0x50;
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: LCD 18F45K20
I have this working now, sort of. I made a test file.
which works fine occasionally. Problem is it will work, then I turn it off, turn back on and nothing. Is there a code protect or something that needs to be set?
Cheers
John
which works fine occasionally. Problem is it will work, then I turn it off, turn back on and nothing. Is there a code protect or something that needs to be set?
Cheers
John
- Attachments
-
- test 18f45k20.fcfx
- (7.32 KiB) Downloaded 274 times