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.

PIC-Programmer 2 for PIC16C84, its software & compiler???

Status
Not open for further replies.
Did you load the project blink84 with MPLAB ? you should to see what going on and build it and then just point your programming winpic800 to the hex it and load it. See if that don't work.
 
winpic800, i fear, cant be accessed from mplab?

I know that you use it to load the hex if he loads the project blink84 in MPLAB have a good look at it and rebuild it and then point winpic800 to where it complied the hex and load that
hex it will work fine

He been exporting a hex .
 
I know that you use it to load the hex if he loads the project blink84 in MPLAB have a good look at it and rebuild it and then point winpic800 to where it complied the hex and load that
hex it will work fine

He been exporting a hex .
thanks Burt !
 
I only us MPLAb export function to change configure bit's MPlab is setup to make proper HEX for a pic There a good Tutorial here https://www.gooligum.com.au/tut_midrange_C.html

He could use them 1 to 5 would work with a 16f84a It would give a idea but it is using older H-Tech C and some things have change in the newer version
 
happy hassan saheb. But in fact we would waiting to share that you learn and be able to write your own medium size programs in C. It would be possible in say 45 days, if you are serious.
All the best.
The best effort came from Burt and , i too thanks him for his nice guidance.
 
Last edited:
yeah u r right Sarma now I will try to spend my more time for coding & doing different things from controller,keep advicing me,thanks



Hassan
 
Here a sample using a button on PORTB.2 and Led on PORTB.0
Code:
#include <htc.h>
	__CONFIG (FOSC_HS & CP_OFF & WDTE_OFF & PWRTE_ON );
#ifndef _XTAL_FREQ
 // Unless already defined assume 4MHz system frequency
 // This definition is required to calibrate __delay_us() and __delay_ms()
 #define _XTAL_FREQ 4000000
#endif
void init(void)
{
// port directions: 1=input, 0=output
TRISB = 0b00000100; //set's portb to outputs all but RB2 and it's a input
RB0 = 0;  //starts RB0 off
}
void main(void) //main code atfer here
{
init(); //runs startup code
while (1){  //loop
	if(RB2=0){  // check switch
		__delay_ms(50);  //delay to let switch debounce 
	if(RB2=0)
		RB0 = 1; //If switch is Low led is on
	else
		RB0 =0;  // Switch High led is off
   }
}
}

Just add a switch like this
View attachment 60930
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top