Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

pic18f4550 (configuration)

Status
Not open for further replies.
thank you ,
help me please and i am sorry for the disturbance
I bought PICkit2 as you told me.but I can not make the LED flashing
I want to achieve the project as shown in the following video

Blinking light using pic - YouTube

my project,work without using the component,
I mean without
- crystal oscillator, 4 MHz
-100 NF capacitor
-470 NF capacitor

I mean just with (PICkit2, led, PIC18F4550, pc, breadboard) I can have led flashing


if you can tell me or send me the code I use mikroC for hex file
here is my code
void main () {
PORTD = 0;
TRISD = 0;
while (1) {

PORTD.f1 = 1;
Delay_ms (100);

PORTD.f1 = 0;
Delay_ms (300);
}
}

thank you
 

The code seems to be ok (not sure though, i don't use MikroC, there may be something wrong with port definitions). When done programming did you click 'bring MCLR to VDD'? (or Release from reset).

And while flashing led may work without these components, anything needing more frequency accuracy (like USB) won't.
 

thank you ,but where I click bring MCLR to VDD,i dont use any components
just (PICkit2, led, PIC18F4550, pc, breadboard).
As in the picture

no more no less
I use mikroC and PCkit2 program to load the hex file

thank you
 

thank you very much really and I swear I appreciate your help.
for the option you told me it "/ mrcl" I have already done, but still it does not work I do not know what's the problem
thank you

firstly I connect PICkit2 to my pc
Secondly I run PICkit2 programmer
PICkit2 program displays

PICkit2 found and connected
peak device found

Third file ----> import hex file ------> write ----> Successful programming then hold device in reset

and for the program Here Is

void main () {
PORTD = 0;
TRISD = 0;
while (1) {

PORTD = 1;
Delay_ms (100);

PORTD = 0;
Delay_ms (300);
}
}


this is the first time for me to use PICkit2 etc.
you help me very well thank you
I bought the PICkit2 as you told me
and if I not disturb you,can you try my realization all ,if it works and thank you , just to see what the probems
 

you have to connect MCLR resistor or else it will not work. connect 10k resistor, one end to vdd and other to pin 1
 

thank you very much
I did what you told me but still does not work


what the problem please help
 

replace led 10k resistor with 330ohm or not more than 1k.. then check
 

hello,thank you very much
I did what you told me
i did replace led 10k resistor with 300ohm
but still does not work

what I need? i need a LED that has less than 2 V
or I need to configurate my picket2 or two pic
Please help me I follow all that you told me
it does not work
and I begin to give up

please help
 

hello everyone especially "poorchava" and "devil6600", etc.
firstly I bought a new pic : PIC 18F4550
then I bought as you told me: PICkit2, and
2 resistors of 300 ohm, led and breadbord,
and I realized the following diagram as shown in Figure



and like the following video

Blinking light using pic - YouTube



Once I realized this scheme, I have connected my pc to my PICkit2
and I run PICkit 2 v2.60
I have this resulat as shown in Figure



which means that all is right until now because it has detected my PIC 18F4550 and it is connected
then "import the hex file" that I executed in proteus and it works then "write" then "on"




Here is my code and work in proteus7

void main () {
trisd = 0;
PORTD = 0;
while (1) {

portd.f1 = 1;
Delay_ms (300);

portd.f1 = 0;
Delay_ms (300);
}
}

and finally that nothing happens
What is the problem ??
I did what you told me

what I need?

Prayer and please
I need your help, please help me, and I am very grateful
thank you very much
 

Code:
void main () {
trisd = 0;
PORTD = 0;
while (1) {

portd.f1 = 1;
Delay_ms (3000);   //Give large delay, you can not detect 300msec with eyes give at-least 1 second delay

portd.f1 = 0;
Delay_ms (3000);
}
}

Whats your crystal frequency also check with multimeter Voltage on MCLR pin it must be around 5V and also on supply and ground.

Hope this helps

---------- Post added at 08:07 ---------- Previous post was at 08:04 ----------

Where is your crystal oscillator, have you used internal oscillator, while using internal oscillator you have to also adjust the OSCCON register
May be to OSCCON = 0xF2;
I am not sure, i will post the code when i come back to my home..

Hope this helps
 

thank you very much, yes i use internal oscillator,So I have to change my code,when you come to your home, please do not forget me
and thank you

i try this ode but nothing heppens


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
void main() {
   OSCCON = 0xF2;
OSCTUNE = 0x00;
trisb=0;
portb=0;
while(1){
 
portb.f1=1;
Delay_ms(3000);
 
portb.f1=0;
Delay_ms(3000);
 
 
}  }



help please
thank you

---------- Post added at 13:31 ---------- Previous post was at 13:17 ----------

is that it may be that my piC and PICkit 2 is damaged, not because when I excute pikkit2 v2.60 it detects my pik and it is connected
 
Last edited by a moderator:

Code:
//Led Connected at RB1 pin of Controller

sbit LED at RB1_bit;

void main()
{
 OSCCON = 0xF2;
 TRISB = 0x00;
 PORTB = 0x00;
 while(1)
 {
  LED = 1;
  Delay_ms(1000);
  LED = 0;
  Delay_ms(1000);
 }
}

This code is working for me....
Config_Settings.PNG

Have a look, its working for me...

Hope it will also work for your..

Your pik-kit2 is writing program to controller or not..
 

thank you very much realy thank you
but nothing heppens
when I execute PICkit2 v2.60 it detects my pic and it is connected, and I click on the button "write" -----> Programming Successful. that you means about (Your pik-kit2 is writing program to controller or not)
as I have already montionné in the previous message
certainly there is an error that may be my pic or PICkit2 is damaged
can you please give schema maybe I'm not well connect the components and the software that you use

thank you
 

I hadn't used pik-kit2 in my life, my using 20times cheaper programmer than pik-kit2 and it works fine for mine..
Try changing your Controller,

If pik-kit2 is showing the Programming Successful message than it means programming is done..
and i had found in some cases even the faulty controller gets programmed, may be same as ur case..

Try checking the Voltage levels on each pin and after that replace controller with new one
 

thank you very very much
but nothing heppens

where you think is the problem in PICkit2 or PIC 18F4550
is there any case they have like my problem
and how solved

thank you
 

I can't say anything....

Even a simple Bit Toggling Program is not working.... it means there is some issue related to ur hardware.

So Try to replace ur controller with a new one..

And if possible place a crystal oscillator..

I don't know what to say now..
 

I tell you thank you very much,thank you very ... very much
and how nice of you to try to help me

it costed me a lot and finally it does not work
this was my dream to make it work

here the link where I bought the components:

MICROCHIP|PIC18F4550-I/P|MICROCONTROLEUR 8 BITS FLASH | Farnell France (for pic)

https://fr.farnell.com/microchip/pg164120/programmateur-pickit-2/dp/9847170?Ntt=pickit+2+PG164120 (for pickit2)

hurt;

thank you

---------- Post added at 19:19 ---------- Previous post was at 19:17 ----------

https://fr.farnell.com/microchip/pic18f4550-i-p/microcontroleur-8-bits-flash/dp/9321357 (for pic)
 

I purchased my controller for just 5$ and Programmer for Just 9$(JDM Based Programmer).

Farnell is 10times costlier ...
Anyways try replacing the components hope it will work..
At least change controller
 

thank you
I changed the PIC18F4550 by PIC16F877A but still does not work
can you give me all the details
links and pic frequency 16fxx or 18fxx
what I buy ? pic blank or ..
software
schema
all
and thank you
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top