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.

Two PIC questions...

Status
Not open for further replies.

Wond3rboy

Member
The querry:

I heard in one of Gramos tutorial that the programming pins for 40 pin PICs are same as 28 pin and the 20 pin are same as 18 pin. But if you look at the 16F877A and say the 18F2550 the programming pins dont match.So is it true for 18Fs only. I want to make that board .

Is there any way one can use the RA5 pin for i/p,other than MCLR since you need to connect MCLR to the Power On Reset?Or can one use it for general i/p as well.If so how?
 
Last edited:
You can use RA5 as a general purpose pin but your programmer will need to support it, or you will not be able to program the chip again after the first time. You need to set the correct configuration in order to use the pin.

What language do you write code in and what programmer do you have? With the combination of these, we will be able to tell you the right syntax.
 
The querry:

I heard in one of Gramos tutorial that the programming pins for 40 pin PICs are same as 28 pin and the 20 pin are same as 18 pin. But if you look at the 16F877A and say the 18F2550 the programming pins dont match.So is it true for 18Fs only. I want to make that board .

Is there any way one can use the RA5 pin for i/p,other than MCLR since you need to connect MCLR to the Power On Reset?Or can one use it for general i/p as well.If so how?


Pin 1 on the 877A is the MCLR pin not RA5, looking at the 40 pin package

Same for the 18F2550, looking at the 28 pin package

Look at the Microchip website for the data sheets and compare the pinouts...
 
Pin 1 on the 877A is the MCLR pin not RA5, looking at the 40 pin package

Same for the 18F2550, looking at the 28 pin package

Look at the Microchip website for the data sheets and compare the pinouts...

Thanks for your replies.


Sorry i forgot to mention i was talking about the 18F1320 in the second part.

About your answer that the MCLR pin is same(you are right) but i was talking about the Programming pins. I mean all 5.

The programmer is Junebug.
 
Last edited:
MCLR on all 18F PICs can be used as an input pin and the reset line is connected internally to VDD by a config statement.
Until you're familiar with the PIC I wouldn't get too excited about that feature as it can potential pitfalls.
1. may require VPP before VDD programming (the Junebugs tutor is always VDD before VPP you may have to remove the 18F1320 and connect it to the ICD connect which supports VPP before VDD)
2. no debug support in that mode, debug need the MCLR pin.

PS the older 16F877A does not allow for MCLR as an input pin, the modern 16F887 does.
 
Last edited:
If you are going to use the 18F1320 you should look into bills "junebug" which is a pickit2 with an 18f1320 tutor onboard. it is really handy to have since it has everything you need onboard to do what you need/what usually.
 
Hi I got everything ready on the Junebug PCB. I programmed the 18F2550 with a TOP2005 programmer(my friend's), the problem is that it says that no configuration words have been set. Are we supposed to manually set configuration words? Arent they supposed to be part of the hex file? I am using version 2.32 of firmware.

Thanks.
 
Last edited:
When i do plug it in(expecting a miracle lolz!) it says that no PICKIT2 detected(duh!). :(


PS: Another thing that i would like to point out is that when did try programming the chip(using winpicprog) i did have to set some options.But what options am i supposed to set or change when doing it HVP with the programmer mentioned above.
 
Last edited:
Is it a Junebug clone or a selfmade copy? The kits include a preprogrammed 18F2550. And yes you can use the 2.32 hex file.
One quick test is hold down the bootloader button on powerup, the LED will flash if it's programmed.
 
Hi Bill sorry for late reply.I have posted a picture of the Junebug( I wanted to start a big thank post for the PCB once i got it working).The power LED is fine, the 18F2550 power LED is faint but i get 4.92v on it(the same i get on Vdd and Gnd from the USB port).I have already done the tests written in your manual, the busy LED doesnt light up when bootloader switch is pressed.I think it is a matter of programming the firmware. I did put my question that when i program my chips(all 4 of them the 18F2550's) the programming works great(except the encryption part) but it says that no config words have been set. I guess thats the problem for it not operating. Is this supposed to happen? I mean if it does ask us to set the config words, what am i supposed to set, the usual like

OSC=lp,WDT=off ??

I could whip up the parallel programmer(LVP) but i think one cant LVP a HVP'd chip right?
 

Attachments

  • 150620091865.jpg
    150620091865.jpg
    265.7 KB · Views: 178
Last edited:
You can try an LVP programmer on the 18F2550, another user here claimed it worked for him on a DIY Junebug.


Hi Bill i got the Junebug working( i guess you can LVP an HVP'd chip which has not got any configuration words). But there is a hinch to it which is that the target power LED droops(nearly closes) in most USB ports(be it my laptop or my PC). I am going to change the wire that i use to connect it but the power supply to the tutor and the programmer power LED is fine. Its the firmware powe LED thats the problem.Is it because of the wire?? If not what could be that sometimes its working and at others it is not.


YouTube - Junebug Atlast!
 
If you can get another 18F2550 use the Junebug to program it with the latest PK2 firmware and swap the chip with the LVP programmed one in the Junebug.

Nice video :)
 
Bypass VDD control with a short wire between +5V & U5V

Hi Bill, the very faded LED actually means that it doesnt detect an IC there!

Also when it does recognize something(its like luck you pull and put the wire in and out the socket and hope it reads the IC) it says that 'Unrecognized USB device' even after i reprogrammed the IC with the Low Voltage Programmer.

Also i found an old post in this forum in which 3V0 said that he resolved this error by using a .22uf capacitor on C6. That didnt work out and i accidently damaged the upper ring of that hole. I have pushed it down and it seems to be working for now( i will need to solder it from the top side as soon as i get it working).

Here are the 'tests' i have done:

Checked the 3.3v test(it does have when i get the USB Device not re...' error). When the target LED is very faded then no voltage.

The bootloader LED blinks when i press it(of course it happens when the targer power LED is ON).

Is there anything i am missing??I am about to tear my hair out!
 
Ideally C6 (the internal USB voltage regulator filter cap) should be 0.47uF but 0.22uF should be fine. 1uF might work, never tried it though.
I've never figured out or tried an LVP programmed 18F2550 although I'm told it works I'm not fully convinced as an LVP PIC required the LVP pin to be pulled to GND for the chip to run and the LVP pin is the bootloader button!

That said the config fuse must be correct for everything to work. Make sure your programmer is setting them correctly.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top