I really want to learn this stuff.
maybe the phrase "can't teacjh an old dog new tricks" comes into play??
need to look at a data sheet closer, need to figure out the pickit2 lessons than figure out swordfish.
but need to build the dang junebug
It's A good programmer and Bill did a very good job with it. maybe this will help you some
It's a led Bink and a led on
Code:
Device = 18F1320
Clock = 8 // tells the compiler the FOSC speed
Config OSC = INTIO2, WDT = OFF, LVP = OFF
Include "Utils.bas"
dim LED as PORTA.0
dim sink as PORTA.6
OSCCON = %01111111 // select 8MHz internal oscillator
SetAllDigital
Output (PORTA.0) // sets pin to output
Output (PORTA.6)
low(sink) // LED is off
While true
delayms(1000) // wait one second
toggle(LED) // switch on
Wend
Code:
Device = 18F1320
Clock = 8 // tells the compiler the FOSC speed
Config OSC = INTIO2, WDT = OFF, LVP = OFF
Include "Utils.bas"
OSCCON = %01111111 // select 8MHz internal oscillator
SetAllDigital
Output (PORTA.0) // sets pin to output
Output (PORTA.6)
While true
High (PORTA.0) // turns on led 1 of junebug
Low (PORTA.6) // sinks for led 1
Wend
If you have setup the PK2CMD.exe to work with Swordfish it's F<10> (compile & program). F<9> will only compile to a .hex file. You could use PICkit2 standalone software and load the hex file that way.
The only thing is after programming I can't power my pickit2 with swordfish IDE maybe blueroom know how to make it turn on when finished. easy to over look this file this is what you need to use F10 with swordfish and the junebug or pickit2 https://ww1.microchip.com/downloads/en/DeviceDoc/PK2CMDv1-20.zip