PIC Microcontrollers

Discuss modifications you have done or plan to do to your Dreamcast or any other hardware, or discuss devices you want to build. If your console does not work or is acting up, ask about fixing it in here.
Post Reply
User avatar
Prophet][
DCEmu Mega Fan
DCEmu Mega Fan
Posts: 2984
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Fri May 31, 2002 6:10 am
Location: Adelaide
Has thanked: 0
Been thanked: 0

PIC Microcontrollers

Post by Prophet][ »

Has anyone used a PIC before? I am building a circuit using a PIC30f2010 but can't program the IC. I got given an programmer from a Ph.D student who said he uses it all the time but I can't get it to work. Mainly I can't find a program that works. I'm willing to build my own programmer if I have to but does anyone have any success with a programmer and uploader for the 30F series?
User avatar
semicolo
Mental DCEmu
Mental DCEmu
Posts: 328
Joined: Mon Apr 25, 2005 1:02 pm
Location: Three-rivers canada
Has thanked: 0
Been thanked: 0
Contact:

Post by semicolo »

nope, used 16f84 or 12cxx series, is it a new device ? what clock are you using ?
Ex-Cyber
DCEmu User with No Life
DCEmu User with No Life
Posts: 3641
Joined: Sat Feb 16, 2002 1:55 pm
Has thanked: 0
Been thanked: 0

Post by Ex-Cyber »

How does the programmer connect to the system? If it's via a parallel port you may need one of the various drivers that lets programs do direct I/O accesses in order to get it to work.
"You know, I have a great, wonderful, really original method of teaching antitrust law, and it kept 80 percent of the students awake. They learned things. It was fabulous." -- Justice Stephen Breyer
User avatar
Prophet][
DCEmu Mega Fan
DCEmu Mega Fan
Posts: 2984
Joined: Fri May 31, 2002 6:10 am
Location: Adelaide
Has thanked: 0
Been thanked: 0

Post by Prophet][ »

I got it working now. I think what you said Ex was the problem.
User avatar
Prophet][
DCEmu Mega Fan
DCEmu Mega Fan
Posts: 2984
Joined: Fri May 31, 2002 6:10 am
Location: Adelaide
Has thanked: 0
Been thanked: 0

Post by Prophet][ »

Another related question. Now I can't program the thing properly. Im just trying to test outputs by telling the PIC to output either high or low on certain ports. The code I'm using is this:

Code: Select all

#include "p30f2010.h"
 int counter;
 int main(void)
 {

	TRISD = 0x0000;
	
	while(1){
		PORTD = 1;
	}	 
}

To me this should put 5V on PORTB0 or on 1-5 if its active low. I've tried other hex numbers but none results on any port giving 5V. I just using the MPLAB V7.5 to to write the program in and use with the MPLAB C30 compiler.

I would also be helpful is someone knows a PIC for beginners site that has good tuts. Once I can produce outputs though I should be right.
User avatar
semicolo
Mental DCEmu
Mental DCEmu
Posts: 328
Joined: Mon Apr 25, 2005 1:02 pm
Location: Three-rivers canada
Has thanked: 0
Been thanked: 0
Contact:

Post by semicolo »

there should me emulators you can use to simulate what's happening.
Maybe you've got a watchdog trouble, or the port is configured as input.
Post Reply