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 29th September 2007, 03:34 PM   (permalink)
Default

Greg,

You say it programs OK when you physically disconnect PIC pin #10 from the LCD???

As a test keep pin#10 connected as normal, start the program sequence and measure what voltage level is actually on pin #10 throughout the sequence, voltmeter or scope would do it.

Lets know what voltage level you see on this pin.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 29th September 2007, 03:35 PM   (permalink)
Default

Without the comments and probably better labels it'll be tough going to decode someone elses source code, especially if you're not yet that familiar with the PIC. LCDs can be tricky until you get the hang of them, 4bit mode even more so.

The commands are (TRIS PORTx and OPTION)
they won't compile and have to be changed to movwf TRISx and movwf OPTION_REG
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now  
Old 29th September 2007, 04:31 PM   (permalink)
Default

Eric - I've put a scope on pin 10 - its a constant 5V throughout the programming. I guess this is why it keeps failing. Dunno why I didnt think of doing this before! I've now put a 10k from pin 10 to ground and its working!!! Wooo hoo!!

Bill - I know its going to be tough, but I'm going through the code add tons of comments and proper labels - this way I can slowly step through the code finding out exactly what it does. I'm sure there's an easier way but I'll put it down to the learning process

Thanks for all the help!!
gregmcc is offline  
Old 29th September 2007, 05:01 PM   (permalink)
Default

You might try using WinPicprog to disassemble it, as it adds labels for you - you still have to edit them to make sense, but at least it's one job less!.

Having said that, I've done it for you!.
Attached Files
File Type: zip temp.zip (2.8 KB, 14 views)
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk

Last edited by Nigel Goodwin; 29th September 2007 at 05:07 PM.
Nigel Goodwin is offline  
Old 29th September 2007, 06:41 PM   (permalink)
Default

Thanks! Should make things a lot easier.
gregmcc is offline  
Old 30th September 2007, 09:33 AM   (permalink)
Default

Quote:
Originally Posted by gregmcc
I've build a LCD clock using the schematic attached. The first time I program it using a Inchworm everything programs fine. If I recompile (mplab) and want to reprogram the PIC I keep getting errors. (verification failures)

I've done some fiddling and its to do with the PGM pin being connected to the LCD - if I disconnect the LCD it programs fine.

While this solution is ok I would like to program without disconnecting the pin all the time. I've tried a 10k resistor between the PIC pin10 and the LCD but no luck.

Whats the trick here to get it working?
Hey few months ago, i maked this and it worked nicely.
pasanlaksiri is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
LCD Troubles Kyle-s4h Micro Controllers 13 11th September 2007 01:30 PM
Error programming 16F628 gregmcc Micro Controllers 67 28th August 2005 09:17 AM
16f628a programming only got 16f628 support will it work? lompa Micro Controllers 6 18th December 2004 06:51 PM
16f628 programming develop Micro Controllers 0 1st January 2004 01:52 PM
Programming the 16F628 rewguy Micro Controllers 4 30th October 2003 09:17 AM



All times are GMT. The time now is 08:28 PM.


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

eXTReMe Tracker