Page 1 of 1

Port D3 problem

Posted: Thu Oct 09, 2008 9:36 pm
by goldwingers
Hi Guys,
I have a problem which i dont understand. I have finally managed to create a program in VB2008 express ver... It is quite simple at this time. however here is my problem

Set up:
16F877 chip onboard
LCD on port A
Switches on port B
USB on port C
LED's on port D

when i send a specific byte to port D ie 1 thro 8 the leds light up individually but D3 does not. any Ideas?.

Regards

Ian

Re: Port D3 problem

Posted: Fri Oct 10, 2008 9:15 am
by Benj
Hello Ian

When you say you are sending bytes 1 through 8 do you mean you are sending values 1 through 8 or values 1 through 255. Sending a value of 16 or 0x10 should be correct to set pin D3. Other then this is there anything different for the PortD hardware I should know about. Might also be worth checking the output voltage level on pin D3 to check if the LED has become damaged rather then the output pin.

Re: Port D3 problem

Posted: Fri Oct 10, 2008 6:25 pm
by goldwingers
Hi Ben,
Sorry what i meant to say is i am transmitting the asc11 numbers 49 through 56 (1-8). These are checked by decision boxes and illuminating the associated LED on port d as follows

Transmit Port D
Asc11 output
49 decision = 49 D0 - on
50 decision = 50 D1 - on
51 decision = 51 D2 - on
52 decision = 52 D3 - on (this one does not work)
53 decision = 53 D4 - on
54 decision = 54 D5 - on
55 decision = 55 D6 - on
56 decision = 56 D7 - on

A further Asc11 is sent
58 decision = 58 reset all port d to off

When 52 is sent from the PC the led on D3 does not illuminate.
Something in my mind tells me this D3 output was a subject long ago.

Checked the LED board on port B and all is well there

Regards
Ian

Re: Port D3 problem

Posted: Mon Oct 13, 2008 11:04 am
by Steve
Hello Ian,

There is nothing "special" about D3 - is should behave in the same way as all other i/o lines on port D.

If you create a simple program to display certain bit patterns onto portd, you should be able to work out if D3 is in fact broken (on the board or the chip i/o line itself). If D3 works in this situation, then there could be a problem with the logic of your program.

Re: Port D3 problem

Posted: Mon Oct 13, 2008 6:24 pm
by goldwingers
Hi Steve, it was indeed the chip :mrgreen: