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.

Swordfish SE Question

Status
Not open for further replies.

lclark

New Member
I just got my Junebug kit finished and am trying to get started with the sample programs (particularly Blink) using Swordfish. When trying to complile and program, after going through the programming process, I get a message box that says I have to reset the microcontroller. I know it is probably something simple, but I can't figure out how to do this. Can anyone help me out? Thanks!
 
If you are using Swordfish's IDE then you'll need the PK2CMD.EXE (download from Microchip)
From the Swordfish IDE
View/Program and Compile Options/Programmer
Create a new entry Junebug and enter
Code:
/PPIC$target-device$ /F$long-hex-filename$ /M /R /H2
This will program allow Swordfish to work directly with the Junebug (It also runs after compile automatically)
 
Last edited:
Hmm, then I'll just repost it. It was small.
The new PICkit2 2.50 software includes a very useful logic analyzer tool. Here's a simple program that will let you use the LA tool to view / analyze many IR remote signals (36KHz - 40KHz)

Code:
;*** Junebug IR Bridge, uses PICkit2 Logic Analyzer mode Ch1
;*** DIP-4 (TX) should be on, Trigger Analyzer on Ch1 "/"
    list    p=18F1320        
    include    <p18f1320.inc>
    CONFIG    OSC=INTIO2,WDT=OFF,LVP=OFF
    org    0h
    movlw    72h
    movwf    OSCCON        ; 8MHz clock
    setf    ADCON1        ; set all I/O to digital
    bcf    INTCON2,RBPU    ; enable PORTB input pullups
    movlw    b'11111101'
    movwf    TRISB        ; RB0 in, RB1 out
loop    btfss    PORTB,0
    bsf    LATB,1    
    btfsc    PORTB,0
    bcf    LATB,1
    bra    loop        ; loop forever
    END


**broken link removed**
Sony 12bit SIRC power command from a Sony RVM-V202 remote control
 
I agree, PICKIT 2 (that JuneBug clone :D) is really nice. ~40$ and you have all those nice features and more to come. I wish they could add some kind of protocol analyzer feature... but this would kill their PICKIT Serial Analyzer sales... if there's any...
 
Thanks Bill. I downloaded and installed PICKIT2 but have no idea how to even input the program...I'm a total noob. I'll have to get my nose in the manuals and get to reading.
 
I put together a video tutorial a while back for beginners and PIC programming, even goes into using SF and PICKit2 software and programming your PIC

  • From start to end - how to get an LED to blink!
  • Basic hardware requirements
  • Concept of breadboards
  • How to use PICKit 2 and Swordfish software
  • How to drive datasheets to extract pinouts etc

**broken link removed**



There's a new version with a few updated bits n pieces (eg, you can just use a normal 0.1uF ceramic disc instead of a tantalum cap on the voltage reg)
 
MPLAB is for creating / editing / debugging your firmware, it's an all in one development environment. It also includes a software simulator and a stopwatch. MPASM and many PIC compilers can be seamlessly integrated with MPLAB's IDE.

PICkit2 software is for reading / writing .HEX files, it also contains many utilities for your PICkit2 / Junebug. Diagnostics, naming your programmer, UART tool, LA tool, one button programming, EEPROM (SPI, I2C, Microwire) programming. It's an excellent complimentary tool to MPLAB.

PK2CMD is the command line programming tool. Swordfish can use this to program the target PIC from within its IDE.

The PICkit2 & Junebug are very flexible tools, you can even load custom firmware on them such as a FT232 emulator with the built in bootloader.
 
Thank you very much to both of you! I'm diving into the tutorials and watching videos. I think they will be a great help in my learning process. I'll be trying some things out this weekend...pretty exciting stuff!
Thanks again!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top