Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 7th January 2004, 04:42 AM   (permalink)
Default PIC 18F452 Will cause my death....ack

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!
brentonw2004 is offline  
Old 7th January 2004, 06:17 AM   (permalink)
Default

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)
__________________
Eric.
Eclipsed is offline  
Old 7th January 2004, 07:01 AM   (permalink)
Default

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 http://www.winpicprog.co.uk.
Nigel Goodwin is offline  
Old 7th January 2004, 02:59 PM   (permalink)
Default

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
ivancho is offline  
Old 10th January 2004, 08:52 PM   (permalink)
Default RE:PIC 18F452 Will cause my death....ack

I had the same problems when I went to the 18F452. It has a different way of programing, it uses table writes to write to flash memory.

What I use is PP18 at:
http://perso.wanadoo.fr/softelec/Pro...18_PP18_us.htm

He has a programer that he redesigned. I built one like it and it works great.

Let me know if you need more details

Good luck
Kent Kenison
kentken is offline  
Old 10th January 2004, 08:54 PM   (permalink)
Default RE:PIC 18F452 Will cause my death....ack

I had the same problems when I went to the 18F452. It has a different way of programing, it uses table writes to write to flash memory.

What I use is PP18 at:
http://perso.wanadoo.fr/softelec/Pro...18_PP18_us.htm

He has a programer that he redesigned. I built one like it and it works great.

Let me know if you need more details

Good luck
Kent Kenison
kentken is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 03:38 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker