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 13th October 2007, 12:16 PM   (permalink)
Default please Help , i have a strange output!!!

Hi All ,

i have a build a new PCB for my 16f877 and all going fine but when i tested any program i got a very strange output.

for example i wrote a avery simple program to light up all leds connected to port b but i got a differant output ....... could you please look at the schematic and tell me if i did somethng wrong ?
Attached Images
File Type: jpg sc.jpg (312.8 KB, 26 views)
watzmann is offline  
Old 13th October 2007, 12:24 PM   (permalink)
Default

You show C2 and C3 as electrolytics, they are far, far too small to be that.

Otherwise, the program is probably more important than the hardware, and you've not shown us that - or even told what actually happens.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 13th October 2007, 12:51 PM   (permalink)
Default

what do you mean by far ?AND how to fix that

my program is with PIcbasic so simple :

Device =16f877
XTAL =4

HIGH PORTB.4
DELAYMS 1000
LOW PORTB.4

HIGH PORTB.5
DELAYMS 1000
LOW PORTB.5
watzmann is offline  
Old 13th October 2007, 01:02 PM   (permalink)
Default

here is a photo to this PCB ,

i have tried to turnoff all the portA analoge by the command : ADCON1=7

but the same proplem

i checked each pin of the PIC ports to ensure that i have no interfe and all ports were fine
Attached Images
File Type: jpg IMAGE0028.JPG.JPG (311.4 KB, 20 views)
watzmann is offline  
Old 13th October 2007, 01:03 PM   (permalink)
Default

Quote:
Originally Posted by watzmann
what do you mean by far ?AND how to fix that
The drawing for C2/3 shows a symbol for an electrolytic capacitor, change the drawing symbol to a 'standard' capacitor.
A value of 10pf thru 27pF would be typical for capacitors in a crystal oscillator.
my program is with PIcbasic so simple :

Device =16f877
XTAL =4

HIGH PORTB.4
DELAYMS 1000
LOW PORTB.4

HIGH PORTB.5
DELAYMS 1000
LOW PORTB.5
The statement PORTB.4 refers to pin #4, and PORTB.5 refers to pin #5
NOT ALL PORTB pins?
I dont use picBasic.
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 13th October 2007, 01:05 PM   (permalink)
Default

Do you not have to set the pins to be outputs?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 13th October 2007, 01:23 PM   (permalink)
Default

no i didn't ,

but i can that now in 1 minute
watzmann is offline  
Old 13th October 2007, 01:24 PM   (permalink)
Default

i know that you are no using PICbasic , you are one of the Assembly leaders
watzmann is offline  
Old 13th October 2007, 01:27 PM   (permalink)
Default

Quote:
Originally Posted by watzmann
i know that you are no using PICbasic , you are one of the Assembly leaders
What I mean, as I dont have PICBasic, I cannot check or compile your code in order to test it for you.

Did Nigels suggestion to set PORTB as outputs, work?
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 13th October 2007, 02:41 PM   (permalink)
Default

o.k now i have some news .

i have set all the port to be output , and i tested the same PIC on an old PCB i have and it worked very well.

so my problem now is in the new PCB ...... i noticed that i have portd.7 ON all the time but i don't know how it get this 1,

even the the pin no.31 is 5volts too, although it's the GND pin in the pic ,

i used my AVO meter for the third time to check in case i have any interfere but i haven't.

do you have any explantion ?
watzmann is offline  
Old 13th October 2007, 02:53 PM   (permalink)
Default

Quote:
Originally Posted by watzmann
even the the pin no.31 is 5volts too, although it's the GND pin in the pic ,

do you have any explantion ?
Fairly obviously if you have 5V on a pin that's supposed to be connected to ground, then it's NOT connected to ground - or at least not to the point you're using as the ground point for your meter.

The picture of the board is really too blurred to see, you've focused past it - but it looks very spread out and poorly designed. For example it's best to keep leads to the crystal and capacitors as short as possible, but you have it mounted well away from the PIC. It may well be OK, as long as every thing is connected, but from your post that's obviously not so.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 13th October 2007, 03:07 PM   (permalink)
Default

the pic pin 31 is connected to ground but before that it connected too with the Optocoupler Pc817 pin 2 ( GND ).......is it right ?.

now most of my pic ports have 3 volts
Attached Images
File Type: jpg pc817.jpg (58.4 KB, 8 views)
watzmann is offline  
Old 13th October 2007, 03:14 PM   (permalink)
Default

Quote:
Originally Posted by watzmann
the pic pin 31 is connected to ground but before that it connected too with the Optocoupler Pc817 pin 2 ( GND ).......is it right ?.
If the PIC pin is connected to ground it can't have 5V on it, so it's NOT connected to ground. Your PCB appears to be double sided, with through links, do you perhaps have a duff link stopping the ground connection?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 13th October 2007, 03:36 PM   (permalink)
Default

yes my PCB is double sided......i'm looking now for this positive link
watzmann is offline  
Old 13th October 2007, 03:38 PM   (permalink)
Default

i'm using eagle to draw my Schematics and the use the eagle Autoroute to wire it...... do you think that eagle can do stupid links ?!!!
watzmann is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
555 timer output help for a newbee... WIZARDSV650S Electronic Projects Design/Ideas/Reviews 6 6th April 2007 05:04 AM
Using PicBasic with Output compare for sounds mduong77 Micro Controllers 7 29th March 2007 03:29 AM
barcode scanner's output and keyboard output zhi_yi General Electronics Chat 3 21st November 2006 05:46 AM
Function Generator output driver evandude General Electronics Chat 6 31st January 2005 08:49 PM
Why the output of ICs doesnt reach 5V?? StupidDum General Electronics Chat 3 3rd December 2003 08:29 AM



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


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

eXTReMe Tracker