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 18F452 Will cause my death....ack

Status
Not open for further replies.

brentonw2004

New Member
Hello everyone. I am currently being tormented by a PIC 18F452, and most any other chip I touch. I have been using a 16F628 for some time now and have had success with it, but then I needed some ADC inputs and tried to move to a 16F819, I got the inputs working on it, but then I realized that this chip doesn't have a USART for serial out for my LCD and communication with my computer. Would a 16F876 work for both? Ok, now to my actual problem. I moved to a 18f452 because had one that I from a friend because it is supposed to have both USART and ADC and it has a lot of space. I have tried to program it with the same tools I have programmed the others with, ICProg, Pic Basic Pro, and MicroCode Studio, and they all claim to be compatible and my program appears to load correctly. I wrote just a simple program to make sure that PIC is working:

loop:
HIGH PORTB.1
PAUSE 250
LOW PORTB.1
PAUSE 250
GOTO loop

Also I have wire it according to the diagram I have for it:

PIN 1 - +5V
PIN 11 - +5V
PIN 12 - GND
PIN 31 - GND
PIN 32 - +5V
PIN 33 - LED

With this setup I am unable to get anything to happen. Any advice would be greatly appreciated.

Thanks!
 

Eclipsed

New Member
1. I have always had problems with pic's and floating pins, meaning you should do something with the unused pins.This may not be your problem here, but I have had apparently dead pic's that worked fine after I grounded the unused pins.

2.I have noticed that some of the 18f family are very picky on the vdd during programming, some programmers toggle the vdd.If you can, try to program it ICSP.

3.I've bought/built several JDM/ICprog setups, because they are cheap, and I have yet to program a pic of any kind successfully.Try a different programmer.

4.If you are using PicBasicPro there is no need for a USART, PBP has software serial routines(serin,serout)
 

Nigel Goodwin

Super Moderator
Most Helpful Member
The 16F876 includes everything you need, but the 16F819 does really as well - it's very easy to do software RS232, hardly any more complicated than using the internal USART's - it also gives you the options of using any pins you want, and running inverted if needed.

Details for both software and hardware RS232 are in my tutorials at https://www.winpicprog.co.uk.
 

ivancho

New Member
I hope you have PIN1 with a Pull up resistor to 5V, and make sure you have decoupling capacitor near the 5V pin. What crystal are you using?

You have not defined your TRISB register.... make sure you do that to avoid problems. A TRISB = 0 might help.

I once invested in the EPIC programmer..... and it always work. I am not sure about other programmer since I have never had to use anything else. But make sure is not your programmers fault.

Ivancho
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top