Remote control by location (PIC in Oshonsoft)

Thread Starter

camerart

Joined Feb 25, 2013
3,836
Can you modify your software to PIC18F46K20? It is more reliable at 3.3V then your current MCU.
Hi T,
Over this project, I've tried a lot of PICs, starting with 18 PIN Through the hole types.
One of them is PIC18F46K20. I can't remember why I couldn't use it, but it looks perfect. I have some and will investigate further.
Thanks,
C.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,836
Hi,
Wading through the D/S, and checking the website, I came across this one: file:///D:/TECHNICAL/ELECTRONICS/PIC/PIC%20PDFs/18%20Range/18F23K20%2046K20/PIC18LF26-45-46K40.pdf

This is cheaper and in stock at Microchip, and the D/S is only 822 pageso_O
---------------------------------------------------------
Operating Voltage Ranges:–
1.8V to 3.6V (PIC18LF26/45/46K40)
2.3V to 5.5V ( PIC18F26/45/46K40)
---------------------------------------------------------
Is this a better option?
(As previously mentioned, I'm not best at reading D/S, although improving, I fear mistakes!)

C
 
Last edited:

trebla

Joined Jun 29, 2019
599
PIC18F46K40 has more peripherials, for example two serial ports, more ADC channels, hardware limit timer, zero cross detector etc. For motor control (i would choose dsPIC for this) or triac control applications it suits better than K20. But for your system, IMO, is PIC18F46K20 ok.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,836
PIC18F46K40 has more peripherials, for example two serial ports, more ADC channels, hardware limit timer, zero cross detector etc. For motor control (i would choose dsPIC for this) or triac control applications it suits better than K20. But for your system, IMO, is PIC18F46K20 ok.
Hi T,
I've had a quick skim through the D/S and think it is all PIN compatible, and think you may be correct, that it will be ok for this project.
18F46K20 is on PCB7, and programmed with the attached.
The LED is flashing, but 8x too slow (Slight adjustment needed somewhere) It is working first with the internal osc, and I haven't checked the settings yet, but assume it's somehere there.
All cool, after 15mins. The 5V reg is warm.
Thanks,
C.
 

Attachments

jjw

Joined Dec 24, 2013
823
For the correct frequency you should setup the OSCCON and CONFIG1 registers correctly.
I did not check what the defaults are.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,836
Hi,
Previously, with 18LF4620 (Poss because of damage?) some of the PORT PINs showed signals, and voltages. Now only PORTA.2=1.25V, A1=1.25V A0=1.75V.
C.
 

trebla

Joined Jun 29, 2019
599
Power on state of PORTA is analog, except RA4. Therefore measuring analog pins with DMM gives random results. If you want set PORTA pins to digital, set corresponding bits in ANSEL register to zero.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,836
Power on state of PORTA is analog, except RA4. Therefore measuring analog pins with DMM gives random results. If you want set PORTA pins to digital, set corresponding bits in ANSEL register to zero.
Hi T,
I set: 'ANSEL = %11111111 'ANS7-0 disabled' but the voltage stayed, I also tried '0's.
NOTE: The voltage only shows on an oscilloscope, but not on and analogue DVM??
C
 

Thread Starter

camerart

Joined Feb 25, 2013
3,836
...
In OSH there is no HFINTOSC setting, so I used INT.
...

What does this mean?
Can't you set OSCCON register and CONFIG1 to whatever values are needed?
Hi J,
What does this mean?, see attached.
I'll look at OSCCON and CONFIG1 and try to change them.
EDIT: Attachment added.
Thanks.
C.
 

Attachments

Last edited:
Top