Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 7th May 2008, 03:49 AM   (permalink)
Experienced Member
 
Blog Entries: 4
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default Junebug Name & Calibration program (BETA)

This program is designed to set the VDD calibration data (it's erased when you name the Junebug with the PICkit2 software)
A calibrated Junebug can program 3.3V PICs that have 5V tolerant I/O like the 18F67J60 (target must have its own 3.3V power supply)
You use the Junebugs bootloader feature to install the hex file this program creates (hold down the button near pin1 on the 18F2550) before plugging in the USB cable.
After it runs (about 2 sec) unplug the Junebug, close PICkit2 2.50 and hold down the bootloader button and plug in the USB cable. Reload PICkit2 2.50
and install the PICkit2 OS.
This program is in testing at this point, do not change anything unless you understand how the PICkit2 bootloader function.
Code:
; Change only the data in the two following defines
#define MyJune  "Super Junebug" ; Junebug name <= 15 bytes
#define VCal    0xFA81          ; 4.2V Calibration 0x02
    list     p=18F2550
    include <p18F2550.inc>
        org    0x2000          ; Junebug bootloader vector
Start   clrf    INTCON      ; interrupts OFF
        movlw   low(Name)
        movwf   TBLPTRL              
        movlw   high(Name)
        movwf   TBLPTRH         ; point to Name table
        movlw   0xF0            ; EEPROM Name address        
        movwf   EEADR
        clrf    EECON1
        movlw   '#'             ; 
        rcall   WriteEE
Loop    tblrd*+                 ; read table and increment
        movf    EEADR,W
        bz      WR_VCal
        movf    TABLAT,W          ; W = TABLAT
        rcall   WriteEE
        bra     Loop
WR_VCal clrf   EEADR            ; 0x00 0101FA81
        movlw   0x01
        rcall   WriteEE
        movlw   0x01
        rcall   WriteEE
        movlw   high(VCal)
        rcall   WriteEE
        movlw   low(VCal)
        rcall   WriteEE
        bcf     TRISC,0         ; busy LED
Flash   clrwdt
        decfsz  WREG
        bra     $-2
        btg     LATC,0          ; flash busy LED 
        bra     Flash           ;
Name    data    MyJune
        data    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;padding
; enter W = Data, will auto increment EEADR
WriteEE bcf     PIR2,EEIF       ; clear EE flag
        clrwdt
        movwf   EEDATA          ; EEDATA = W
        bsf     EECON1,WREN     ; enable EEPROM writes
        movlw   0x55
        movwf   EECON2
        movlw   0xAA
        movwf   EECON2
        bsf     EECON1,WR
        nop
        btfss   PIR2,EEIF
        bra     $-2
        bcf     EECON1,WREN
        incf    EEADR
        return
        END
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now   Reply With Quote
Old 7th May 2008, 04:02 AM   (permalink)
Experienced Member
 
futz is a name known to allfutz is a name known to allfutz is a name known to allfutz is a name known to allfutz is a name known to allfutz is a name known to all
Default

So that's it? Just fix the software and it'll program 3.3V PICs? With no extra diodes or circuitry? Excellent!
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is online now   Reply With Quote
Old 7th May 2008, 10:45 AM   (permalink)
Experienced Member
 
AtomSoft is just really niceAtomSoft is just really niceAtomSoft is just really niceAtomSoft is just really nice
Send a message via MSN to AtomSoft Send a message via Skype™ to AtomSoft
Default

Quote:
Originally Posted by futz
So that's it? Just fix the software and it'll program 3.3V PICs? With no extra diodes or circuitry? Excellent!
Bill can you confirm this? Or will we still need to do that extra schematic in the manual of the junebug to program 3.3v pics?
AtomSoft is online now   Reply With Quote
Old 7th May 2008, 01:24 PM   (permalink)
Experienced Member
 
Blog Entries: 4
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default

I posted the diode schematic on the Microchip forums, I was told the diodes are unnessary on the 5V tolerent inputs on many 3.3V PICs. I'll consult the datasheets to see which 3.3V PICs have PGD & PGC 5V ratings.

The reason you can't calibrate the Junebug is it doesn't have a programmable VDD generator, but once it's calibrated It'll sense your targets VDD.

I'll put this into JPUG issue 2, I'd like to figure out the formula for calibration
(The PICkit2 puts out 4.2V on VDD and you're asked to measure it)
My USB is 5.03V and the result was 0xFA81 for a calibrated PICkit2.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com

Last edited by blueroomelectronics; 7th May 2008 at 01:30 PM.
blueroomelectronics is online now   Reply With Quote
Old 8th May 2008, 01:28 PM   (permalink)
Experienced Member
 
Blog Entries: 4
blueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to beholdblueroomelectronics is a splendid one to behold
Send a message via Skype™ to blueroomelectronics
Default

Well here's the deal, most 3.3V PICs have 5V tolerent inputs on digital only I/O pins... (always check the datasheet)
The 18F67J60 PGC & PGD are on digital pins so no clamp diodes are needed, the 24F the PGC & PGD are on analog inputs so you do need the diodes. 1N5817 work fine.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now   Reply With Quote
Old 8th May 2008, 01:54 PM   (permalink)
New Member
joseph@e-tech is on a distinguished road
Send a message via Yahoo to joseph@e-tech
Default

isn't it that hard to add a DS4303 chip
joseph@e-tech is offline   Reply With Quote
Old 8th May 2008, 02:03 PM   (permalink)
New Member
joseph@e-tech is on a distinguished road
Send a message via Yahoo to joseph@e-tech
Default

i mean a DS4305
joseph@e-tech is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Junebug to program Microchip boards? parts-man73 Micro Controllers 7 18th May 2008 03:42 AM
Question about Inchworm+ Quan Micro Controllers 54 28th October 2007 12:20 AM
Please help!! program not working vinke Micro Controllers 3 5th October 2007 04:58 AM
First Program in assembly, And Programmer Inchworm. Ayne Micro Controllers 10 9th March 2007 07:26 PM
PicBasic Keypad program Sora Micro Controllers 0 20th April 2004 07:01 PM



All times are GMT. The time now is 02:36 AM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.