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.

Little hep with the junebug

Status
Not open for further replies.
Thought you were in the AVR camp now? I tried the AVRs but they weren't different enough for me to switch. I also found the programming vs debugging tools confusing. It would appear the AVR debugger works much like the PICkit3 as it runs more like a bondout IC (runs the code from onboard RAM and FPGA very fast) not from the target IC (PICkit2, ICD2 etc...)
 
Im just fiddling with AVRs im waiting for them to come in mail :D i just want to know a bit of everything. I know thats not a good thing to do but its my bad habbit :( :)
 
By all means soak up that knowledge while you can. I'm old and set in my ways, you're young and can absorb scads more than me.
I've only seen a handful of firmware programmers who were good with anything (Futz comes to mind)

PS what programmer are you using for the AVRs?
 
Last edited:
Im building me:
ISP adapter (controlled with COM port) from here:
ELM - AVR programmer

When im done and need something more advanced ill buy a AVR Dragon

Futz is a genius (too me) i learned so much from his work its not even funny.
 
Last edited:
What happen to Futz haven't seen him in a long time He must have found his pot of gold
He did good work. I have some AVRs from the plant they used some for controllers. And I have a lot of things from there when it closed. Wish I would of started programming years ago. I liked wires better. All but the high voltage stuff You have to lock it off before you fix it.But now I have time to do a lot didn't before.
 
Here a little code to test IR remote with the junebug in swordfish basic it flashes led 2 on
the junebug when you press a button on the remote.
Code:
Device = 18F1320
Clock = 8                  
Config OSC = INTIO2
Config MCLRE = OFF
Include "INTOSC8.bas"           // Sets up the internal oscillator for 8Mhz straight away
Include "Utils.bas"
Dim sink As PORTA.6             // Names PORTA.6 to sink for led2
Dim led As PORTA.0              //Names PORTA.0 to led 
Dim IR As PORTB.0               //Names PORTB.0 to IR
Output (sink)                   //Sets  sink to output
Output (led)                    //Sets led to output
Input (IR)                      //Sets IR to input
Low (led)                       //Sets led low
SetAllDigital                   //sets all ports digital
TRISB =%00000001                // just to make sure IR is set to input
PORTB =%00000000                // Sets all PORTB low
While true                      // while loop
     If IR =0 Then              //checks to see if IR change states
     Low (led)                  //If IR is low led is on
     Else
     High (led)                 //else if IR is high led is off
     EndIf                      // end of statement 
Wend                            //end of loop
I use a user library called INTOSC8.bas for some reason swordfish doesn't always start your Oscillator at start with this it will.
Just save it to your user library in swordfish. Name it INTOSC8.bas
And the hex is in the zip file if you want it and don't have swordfish. Works with the junebug and the 18f1320. tutor chip
Code:
Module IntOSC8

OSCCON = %01110110
 

Attachments

  • IR1.zip
    254 bytes · Views: 95
Last edited:
I looking at it to see how it works I'm not good at C but the more I use swordfish C starts to look easy to read. And you write good code easy to learn from I showed some
one some LCD code you did. After looking at it was able to fix what he started with C18
using the library xlcd I haven't tried it but most mess up with there delays don't let the
Lcd start up
 
heh swordfish is cool. I never used it for long tho because of BoostC and C18 is somewhat free (Student Editions)

just like swordfish. All have some minor limitations... I have full version of C18 tho. Thats why i use it for 18F pics but for 16F and some 12F you can be sure BoostC is my next choice. And if i have to pay for it for a huge project its cheap! lol
 
I thought Swordfish was a basic compiler?
 
Swordfish is more like C with basic language syntax. I use a module to set the Oscillator.
Because if you use modules It loads them first and then the Oscillator setting which can take some time. Seeing the osc is ruining in khz not mhz till the settings load for it. That's the biggest thing I found that I don't like.
 
Last edited:
heh yeah. I just found out my Package with AVR stuff came in today i got a yellow slip and im off to the post office. Usually they let me pick it up 1 hr before they close since the mail man brings the stuff that was undeliverable back to office.

I got bought 2 AVRs(1x ATMEGA88 and 2x ATTINY2313). And all the parts to make the programmer.

Paid $20 but got enough parts to make about 8 - 10 programmers and 3 AVR ICs so it was not bad :D
Shipping was around $8 so that $12 in parts lol
 
Last edited:
I would release the PCB under a different name, not JuneBug.

you could call it the stinkbug, to make sure no one thinks its as good as a junebug.

by the way just got my junebug finished, it works fine so far, but i haven't done much with it yet.

by the way, be80be, wheres inductor L1 on that board? Does it not have one?
 
Last edited:
It's on the back side it was smd and wouldn't fit on the front side.
 
I made some icsp cables. It programs faster then the pickit2 I have I think it because the voltage levels are higher fast rise time then the pickkit 2 . Like with the pickit2 I get
4.6 junebug is 5.0 VDD and Vpp pickit2 11.4 and junebug is 12. Only thing it needs is a switch to turn off the power to the tutor.
 
how to erase PIC code

using Junebug as In circuit with the 5 pin cable.
I thought it was erasing but it isn't.
I programed a PIC and it works
reprogramed w/ completly different code and the orginal code is still in the PIC
I have dip switch 1,2,3 = OFF
I tried leaving the rest on as well as off?? tried many things so not real sure what I have tried.
I wish the loader could erase but it says I must reset the microcontroller??
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top