PDA

View Full Version : Random digits on 7 segmen display Problem - Please, Please help



Dawid Szczeblewski
02-18-2012, 12:35 PM
Hello :mrgreen:
I have some serious problem with my 7 segment display with open cockpits usb expansion card and displays card
Using FSX FSUIPC 4.7 sioc and contrlador programs. Running on Windows 7 64bit

In the controlador program i am able to send digits to my 3 displays.. all works fine
I can also successfully read offsets from fsuipc i.e heading, ISA etc (by that i mean the values in IOCP console show up exactly as they are in FSX cockpit)

but when I link my variables do displays card the numbers appearing on actual led displays are tottaly random,
for example when I set it to display Heading from MCP the numbers on led displays change as I change the heading in cockpit, but the digits appear random and do not reflect on the actual HDG value.

The only thoughts I have is that the problem might be there because I am using Win 7, (is open cockpits stuff only for win XP???)
also I have discovered that the 40 pin cable from displays to master card had few pins shorted internaly (hdd cable). I am using a new cable with no shorts now.

Its my degree project, I am restoring original cockpit from Nimrod MK4 to work as glass cockpit teaching aid running with FSX, no glass software yet.. just trying to get the mcp to work

fordgt40
02-18-2012, 12:46 PM
Suggest you post your sioc code and also confirm that you have your display card jumpered as per the manual. Also could you advise how many displays you are driving and the number of 7 seg digits for each display

Dawid Szczeblewski
02-18-2012, 12:54 PM
Thanks for a quick responce
The display card is indeed jumpered as per the manual
Its a beginning for me and a testing phase so all i have is one display with 3 digits
here is my code

Var 0001, Link FSUIPC_IN, Offset $07E2, Length 2 // ISA

Var 0002, Link FSUIPC_IN, Offset $0C4E, Length 2 // Nav1 course
{
V0003 = V0002
}

Var 0003, Link IOCARD_DISPLAY, Digit 0, Numbers 3

fordgt40
02-18-2012, 01:05 PM
David

Your sioc code looks ok to me. When you say that the display digits are random, are you getting individual digits that do not appear in the NAV 1 course or just the correct digits but in the wrong order?

David

Dawid Szczeblewski
02-18-2012, 01:16 PM
Digits that do not apear in NAV1 course.. heres an example of few values as i change course from lets say 200 to 205

NAV1 in cockpit display 200 201 202 203 204 205
LED's display 300 200 313 202 304 204

every time i try the numbers are different

Dawid Szczeblewski
02-18-2012, 01:21 PM
Just a thought..
i bougt the ready, assembled cards so i assume that the PIC;s are already programmed?

fordgt40
02-18-2012, 01:31 PM
Yes, still thinking :)

fordgt40
02-18-2012, 02:05 PM
David

Have you tried entering different values for var 0003 into the iocpconsole to see what happens on your displays. That should tell you whether the problem lies with hardware or software.

David

Dawid Szczeblewski
02-18-2012, 02:32 PM
John
Firstly, Thanks a lot for spending time on this :)
I did what you adviced and it seems its the hardware.. brand new btw!!!
I tried following values and here is what i got

values i typed for var 0003 ==> and results on led display
123 ==> 173
456 ==> 446
678 ==> 668
345 ==> 344

totaly random
the question is how do i distinguish what is malfunctioning, the displays, the usb expansion or the masters card :/
looks like along the way its all getting corrupted by hardware
there is a bunch of IC's on master board which convert binary coded decimal to decimal... maybe these are the culprit?
i am clueless... and its all new straight from the box :/

on the contrary when i fir up the controlador software it seems to work, there is one small thing which may be a glitch. i dont know
In controlador, when i chose the display and then the digit that i want to write to it, when i click "ok" most of the times a wrong digit is displayed ( like 5 instead of six or six instead of seven) when i click ok once again a correct didgit is always displayed, on correct display

Dawid Szczeblewski
02-18-2012, 02:38 PM
i just tried a litle script which increases the brightness of displays as it counts up and then it counts back down and decreases the brightness...
the brightness changes are correct, numbers diplayed are wrong again

fordgt40
02-18-2012, 02:47 PM
David

Not totally random:) the first digit is always correct and the third is correct most of the time. I am assuming that you have used the opencockpit pcb`s to hold the 7 seg displays and that connections for both the 7 seg displays elements and the digit select are in accord with the documents on the OC site.

If so, then the suspicion falls upon the 40 way connector cable. If you are confident that the above connections are ok, then if you have a multi meter I suggest you check the continuity on the 40 way cable. I have known intermittent faults when the connectors have been poorly crimped

David

Dawid Szczeblewski
02-18-2012, 04:03 PM
John
unfortuneately not always the first digit is right... not when the values are changing
I have checked the 40 way cable against continuity and shorts.. each and every cable of the 40
I also double checked my LEDs connections for every segment of the displays to the display card and it is 100% right.

When i connected the lot for the very first time yestrday the 40 way cable I used had an internal rail which was short cirquiting 6 out of the 40.. when i discovered it I changed the cable to a new on which is tested and 100% working

I wonder if these shorts on the 40 way cable i used could damage the displays or master card.. :/

fordgt40
02-18-2012, 06:32 PM
David

Just returned from the pub and saw your post. Sadly, on the basis of what we know so far, I can add little except to agree that the shorting of the original cable may be the cause of your problems. I hope not, perhaps some further step by step diagnostics eg testing one digit at a time under varying circumstances may help

Good luck

David (not John):)

Perik
02-18-2012, 07:19 PM
David

What kind of PowerSupply do you use?
and have you tested the Input and Outputs on
your MasterCard (All of them).

BTW - You'll find some nice information here (http://personales.ya.com/micabina737/iocards/hard/guiai.htm):

Dawid Szczeblewski
02-19-2012, 07:26 AM
Oh, beg your pardon David :D
Thanks for all your help, I shall keep on testing, if nothing works I will either have to buy new master and displays card or just the IC's which should be cheaper..

Dawid Szczeblewski
02-19-2012, 07:30 AM
Hi
I am using a dedicated, switching power supply rated at 5V ; 1A
as for the inputs and outputs I tested few at random on each connector, but i will test all of them and let you know what I found

David

fordgt40
02-19-2012, 07:52 AM
David

To completely isolate any "software" interference, I suggest you compile a simple script just defining the variable for one digit and change the value in iocpconsole to see what happens

David

Dawid Szczeblewski
02-19-2012, 09:17 AM
Tested all inputs and outputs
they all work...

Dawid Szczeblewski
02-19-2012, 11:04 AM
David
I tried the script with IOCP console and any number i send arrives at the display inverted as in
0 instead of 1
1 instead of 0
5 instead of 6
6 instead of 5 and so on...
wonder what does it mean
at least all of the ins and outs on master card work so if need be I will only have to buy new displays card

Dawid Szczeblewski
02-22-2012, 01:32 PM
Just an update..
ordered new pic and pic programmer, see if that solves the problem

fordgt40
02-22-2012, 05:37 PM
David

Sorry, but been away and missed your post. I hope that a new PIC solves the problem. Your advice that the display is "inverting" the value of the digits seems to indicate that the actual "display" pathways are working but perhaps the PIC has been incorrectly programmed such that its "lookup" table is screwed. Not certain, but logic suggests this may be the case. Anyway, good luck

David

Dawid Szczeblewski
02-25-2012, 08:34 PM
Unfortuneatly no luck... I programmed a new PIC and exactly the same thing happens, so that rules out a faulty PIC :/
Did any of you guys came across schematics for masters and/or displays II card ???

Perik
02-25-2012, 10:42 PM
Hello Dawid

Here you are:
http://www.andare-ing.com/uploads/iocard_master_64.pdf
http://www.andare-ing.com/uploads/IocardDisplay_mulx.gif

I have a few OC schematics on my site (http://www.hoddo.net/ocboard.html)
but they may differ a little bit on the connectors and component numbering.
PCB layout is completely different.;)

Sorry to hear all the trouble you have with the Display-II board.
It's hard to pinpoint the reason. Nice thing though, it's a very simple board
and not much which can go wrong.
I track down all my errors by doing visual inspection
and a MultiMeter testing for short circuit / connectivity.
When buying readymade IO-board I would expect they are 100% OK.
When that's not the case something serious has occurred and I would maybe
asked for a replacement.

Good luck with your "investigation".

Dawid Szczeblewski
02-26-2012, 11:24 AM
This will help :) Thanks!
BTW nice site!
Unfortuneately I wont be able to return the cards because it all goes through my UNI and it would take ages plus OC either dont answer at all or take ages themselfs..
the good thing is, a lot of posibilities had already been eliminated so I should be close :)

Dawid Szczeblewski
02-26-2012, 05:48 PM
@Perik T H A N K Y O U !!!
Thanks to your manual I managed to solve the problem which as always turned out to be a simple thing...
There was a bad solder ( not really visible ) on the pin 9 of connector J1, with the schematic I was able to identify mux/demux ic's on both sides of the cable and follow the paths to make sure connections are there. Happy, happy, happy

fordgt40
02-26-2012, 05:53 PM
David

Well done - sorry if my suggestion about the PIC sent you down a blind alley, seemed logical at the time:(

David

Dawid Szczeblewski
02-26-2012, 06:15 PM
Not at all David, it had to be checked :) the problem with inverting numbers definitely pointed to problem with logic's somewhere along the way.. bad connection on pin 11 of IC9 ment that there was always a "0" there...
thanks for all your input Dave and helping me tick things off the list!