Port D3 problem

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
User avatar
goldwingers
Posts: 118
Joined: Wed Sep 06, 2006 1:22 pm
Location: London
Been thanked: 1 time
Contact:

Port D3 problem

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Port D3 problem

Post 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.

User avatar
goldwingers
Posts: 118
Joined: Wed Sep 06, 2006 1:22 pm
Location: London
Been thanked: 1 time
Contact:

Re: Port D3 problem

Post 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

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Port D3 problem

Post 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.

User avatar
goldwingers
Posts: 118
Joined: Wed Sep 06, 2006 1:22 pm
Location: London
Been thanked: 1 time
Contact:

Re: Port D3 problem

Post by goldwingers »

Hi Steve, it was indeed the chip :mrgreen:

Post Reply