Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

a remote control using a pic

Status
Not open for further replies.
It shouldn't need any files from mplab/mplabx.

Config settings vary from device to device. If you open the device include file (18F43K22.bas) you can see your choices.
(in the Code Explorer pane of the SF IDE, clicking on 'Includes | 18F43K22' should open the file in an editor window).
Scroll down to the section
Code:
// configuration fuses...
public config
   FOSC(FOSC) = [LP, XT, HSHP, HSMP, ECHP, ECHPIO6, RC, RCIO6, INTIO67, INTIO7, ECMP, ECMPIO6, ECLP, ECLPIO6],
   PLLCFG(PLLCFG) = [OFF, ON],
   PRICLKEN(PRICLKEN) = [OFF, ON],
   FCMEN(FCMEN) = [OFF, ON],
There are some defaults set in that file, but if you add your settings to your main program file those will over-ride the defaults in the device file.

There is also a ConfigGenerator tool that can help out... main IDE menu 'Plugin | ConfigGenerator'
 
... and if you want to experiment with using the internal osc, there's a module that will take care of all that for you.
Just change the 'clock=xx' setting , include "intosc.bas", and it'll add code to the startup routine to set the config, the osc regs, and PLL (if needed)

Code:
device = 18F43K22
clock = 64

include "intosc.bas"
 
Thanks tumbleweed,

I was right then - I really did have no idea what I was talking about :)

Must look at that 18F43K22.bas file to see what else I can learn...

I have updated the project 6 post #52 with the config settings that I think are important for my set-up

Really appreciate you taking the time to answer newbie questions.
Hopefully I will get enough confidence soon to be able to work out more of this for myself.
 
Last edited:
It uses those files to get all the info to generate the various modules, but the compiler itself should be standalone.

No problem helping out... I like exposing new users to Swordfish.
I use a lot of different development tools and languages, but for the PIC18 Swordfish is one of my favorite tools.

People see BASIC and go "eww". IMHO this is definitely one worth checking out.
 
Thanks - I think I get it for now (until next dumb question)
Took me a while, as the P18F43K22.BAS file is in a hidden directory. Once I turned on view-hidden-files, things become much clearer.
... and I can now see the default settings :)

Your recommendation makes me want to buy the full version, but whilst the price is reasonable, would I actually use it? Have to think...
 
Last edited:
The file with the config info in it is Includes\18F43K22.bas (no "p").

The biggest disadvantage to SF is that it's only for the PIC18F series, so if you use a lot of other devices it might be hard to justify.
 
been stalled on my other projects waiting for circuit boards as well as more parts.
In the mean time I am going to reboot this project using the pic18f43k22.
wonder if an lcd display would help to debug or better yet to get the uart feature using two pickit 2"s??
 
Offered without additional comment, support or help.

 
I recall that module but??
Will give it a do
Thanks.
redoing my 8 switch adc resistor ladder then using a SELECT CASE
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top