I know I should look this up first, but I am not motivated:
can you run the Junebug as a debugger too?
EDIT: Yes you can, Cool!
I really like my inchworm+ it has been so good to me lately. No errors, no problems, perfect performance. Can the Junebug beat the all mighty Inchworm+? To set up the Junebug, all I have to do is to select PICKIT2?
Yes, the Junebug works pretty much the same as the Inchworm+ but faster! The Inchworm+ can be mated to a Unicorn kit and would be about the same speed as Junebug. The only advantage is the Inchworm+ supports more high end PICs but that could change as the Junebug (PICkit 2) is catching up fast. Everytime Microchip releases a new MPLAB seems the PICkit 2 gets a firmware upgrade.
Of course you can use the Junebug to play with the Unicorn but it's pretty advanced compared to the Junebugs 18F1320 tutor. I've seen the Unicorn turned into a simple GLCD scope.
I am going to order the parts for the Junebug today. The C programming class was approved, so I was talking to him about getting some junebugs, once they become available. So far, my Junebug kit looks "interesting", as it has strange capacitors, a very oversized crystal, large 5mm LED's, very small buttons, thru hole individual resistors instead of the SIP resistors, and a diode sticking out of a solder hole way to far (the diode is a quarter of an inch in the air soldered )
Hey bill, if I send you a couple dollars in the mail (shipping), can I get a couple ferrite beads that you used? and for more money, can I get the inductor also?
Thanks
As for a kit idea for the junebug (don't know why you would need ANOTHER kit on it ), you could just have the ICD cable connect to another board above or below it for something else.
I was thinking of designing a board for programming a 18 Pin DIP, and I was wondering what are some features I should have on it? I want to fill this 5x2 or slightly small board up
I just tried programming a 18F1320 with my Knight rider light (A lesson that I did myself from 3v0 ) And it worked only with a LED on the MCLR line and a resistor and ground. Here is my knight rider light code
It is in C for the 18F1320
Make sure you have header files and linker files for it
Code:
#include <p18f1320.h>
#include <delays.h>
#include <stdio.h>
#include <stdlib.h>
#pragma config WDT = OFF
#pragma config OSC = INTIO2
#pragma config LVP = OFF
#pragma config PWRT = ON
// define TESTS
#define byte unsigned char
#define int8 unsigned char
#define CMD 0x00
#define DATA 0x01
#define READ 0x01
#define WRITE 0x00
#define TRIS_ACT_LED TRISBbits.TRISB2
// TRISAbits.TRISA2
#define ACT_LED LATBbits.LATB2
// LATAbits.LATA2
void delay_10us(unsigned char t);
void delay_ms(long t);
void delay_10us(byte t)
{
int i;
for (i=0;i<t;i++)
Delay10TCYx(5);
}
void delay_ms(long t) // delays t millisecs
{
do
{
delay_10us(99); // not 100 to compensate for overhead
} while(--t);
}
void delay_us(long us)
{
long x = (us%1000)/10;
delay_ms(us/1000);
delay_10us(x);
}
void main (void)
{
int flip = 0;
long i,j;
//
// Set direction registers
//
//TRISA= 0x00;
//TRISB= 0x00;
TRIS_ACT_LED = 0; TRISA=0x00; TRISB=0x00;
//LAT0xA=0x00;
//LATB=0x00;
while (1)
{
//ACT_LED = 0;
//LATA= 0x00;
//The code below is what I did :) IT was really fun and easy once I learned HEX :D
LATB= 0x01;
delay_ms(1);
//ACT_LED = 1;
//LATA= 0xFF;
LATB= 0x02;
delay_ms(1);
LATB= 0x04;
delay_ms(1);
LATB= 0x08;
delay_ms(1);
LATB= 0x010;
//HEX was used here above and below :D
delay_ms(1);
LATB= 0x020;
delay_ms(1);
LATB= 0x10;
delay_ms(1);
LATB= 0x08;
delay_ms(1);
LATB= 0x04;
delay_ms(1);
LATB= 0x02;
delay_ms(1);
LATB= 0x01;
delay_ms(1);
}
}
You should be able to figure out what Ports I used
LOL I have no idea why it flashes when I program code into it
Even so, should I keep an LED on it? It appears to not affect performance at all.
What else should I add to my board? I want to get it into design by tomorrow at least. Just a few more things I would like to add would be more Status LED's, and some other stuff that will be helpful while debugging and programming.
Make it so there is a dip switch on PORTA (set as input). Make your program read the data on portA and move it back and forth on portB in knight rider fashion. Hint; what does the statement below do to the data in LATB?
LATB <<= 1;
If you want bussed switches then a DP3T switch will do, more expensive than a dip though but nice for switching the MCLR stuff / project stuff. Cheaper yet would be a far more common DPDT switch on just RB6, RB7. Avoid using MLCR for anything but a reset / ICD connection, if you're desperate for that extra I/O line then use a larger PIC.
PS I've updated the Junebug Assembly Instructions on my site, some troubleshooting tips and corrected schematic & BOM plus the blinky LED program.
Keep working with your programming Krumlink, you'll get the hang of it soon enough and then you can transplant a computerized brain into one of your robots.
I am using the mclr pin as a reset, by shorting it to ground. It should be here by next week. Bill if you want these boards for something, PM me and we can set up a deal
Well I was working on a side project that has a small breadboard, a 40pin PIC (a few choices), 20MHz crystal (deselectable), USB optional, keypad / LCD using up ports D & E
I'd just hate to see the little switches lost without a trace. All bussed together like that. Without individual freedom. It's... It's just so ..... UnAmerican.... Your ARE American right?
Looking at Krumlinks code makes me want to learn C18. Can you combine #pragma statements?
I'd just hate to see the little switches lost without a trace. All bussed together like that. Without individual freedom. It's... It's just so ..... UnAmerican.... Your ARE American right?
Yes, I've also been "inspired by Krumlink" and yes, you can combine them in a way:
#pragma config WDT = OFF, OSC = INTIO67, LVP = OFF
I just noticed you're using a three position switch for reset. IMHO just don't add one, the Junebug / Inchworm can both control MCLR. And for standalone; the PIC will reset on powerup.
If you're worried about lockup then learn about the WDT.
Edit here's a simple single sided PCB layout, try to avoid right-angles on traces if you can and lay it out on a grid. This grid is 0.5" **broken link removed**