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.

ICD2 + Vista ??

Status
Not open for further replies.

yngndrw

New Member
Hi,

I just bought an ICD2 clone off eBay, but I find a USB driver for Windows Vista (It only has USB). I have tried both the XP driver which says it cant install because there's a missing section in the .inf and the Win2K driver which blue-screen's at the start of the installation.

The ICD2 is currently installed as an Unknow Device.

What can I do ? :(

Thanks.
 
Thanks for your reply.

Okay I'm kinda embarrassed now, I thought it was an ICD2 clone, but it's actually a PIC Kit 2 clone. Only thing which confuses me is how small the MPLab IDE's compatability list is - That's why I thought it was an ICD2.

What are the major differences between a PIC Kit 2 and an ICD2 ? Other than the fact that I can't use the debugging for most of the PICs ?
 
Look at the MPLAB IDE v7.61 release notes, they have added a lot more devices for the PicKit 2. I think you also need to be sure that you have v2.2 of the PicKit 2 firmware(well at least for the official Microchip product).
 
Ah I didn't realise there was a v7.61, I've been using v7.60. Also been using v2.1 firmware so I'll hunt that down and setup that.

Could anyone please post the code for a simple LED flasher for PIC18F452 devices (In ASM)? I don't really understand how to use the bank select on PIC18F devices, it's cahnged a lot from PIC16F's.

Thank you. :)

Edit:
I've just updated MPLAB to v7.61 but the latest firmware I could find for PICKit2 was v2.1. The new device list is still VERY small, thank god the PICKit's own software supports many more PICs.

Anyhow, I can't get the PIC to do what I want at all. Currently I have a PIC18F452 hooked up to a 4MHz Crystal and an LED on PortB:4.

This is my code:
Code:
;//**************************************************
;//	PIC Setup
;//**************************************************

#include <P18F452.INC>

				LIST	P=PIC18F452

				CONFIG	OSCS=OFF, OSC=HS
				CONFIG	BOR=OFF, PWRT=ON, WDT=OFF
;				CONFIG	CCP2MX=OFF
				CONFIG	STVR=ON, LVP=OFF, DEBUG=ON
				CONFIG	CP0=OFF, CP1=OFF, CP2=OFF, CP3=OFF, CPB=OFF, CPD=OFF
				CONFIG	WRT0=OFF, WRT1=OFF, WRT2=OFF, WRT3=OFF, WRTC=OFF, WRTB=OFF, WRTD=OFF
				CONFIG	EBTR0=OFF, EBTR1=OFF, EBTR2=OFF, EBTR3=OFF, EBTRB=OFF


;//**************************************************
;//	Entry Points
;//**************************************************

				ORG	0x00				;Reset Vector
				GOTO	START

				ORG	0x08				;High Priority Interrupt Vector
				GOTO	$				;Trap

				ORG	0x18				;Low Priority Interrupt Vector
				GOTO	$				;Trap

				ORG	0x20


;//**************************************************
;//	Program
;//**************************************************

START				MOVLW	0x86			;Make all inputs digital
				MOVWF	ADCON1

				CLRF	INTCON			;Disable all interrupts

				CLRF	TRISB

				CLRF	PORTB

				BSF	PORTB,	RB4

				GOTO $				;Trap

				END

It does nothing at all. :/

What am I doing wrong ?

Also if I uncomment 'CONFIG CCP2MX=OFF', my assembler gives an error saying that CCP2MX isn't an option.

Thanks.

Update:
Found out that the config bit DEBUG=ON was causing the program not to run. Fixed that now. :)
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top