Driver+Passengers wrote:
RC0:7, RA0:1, RA5 and RB7 are given over to the LED display. Pin1 is power, Pin20 is GND, and it must be using an internal oscillator. That's 14 so far, leaving six. AN2:3 and AN9:11 are configured as analog inputs (5) and RA3/MCLR is digital input.
[*] Red/Black: power
[*] Cyan/Magenta: LED enable/segments
[*] Blue: analog in
[*] Green: digital in
I'm a bit confused by this and your latest post where you claim pins 2, 10, 18 and 19 are the enables. I think 10 should be cyan and 11 some other colour - it's connected to the LDR.
Anyway here's an update.
7 seg displays – commoned as suggested.
Pin 1 Vcc+
Pin 2 – no connection <200K to any 7-seg pin
Pin 3 Dip 1,2,3,4 – see below
Pin 4 Dip 1,2,3,4 – see below
Pins 5, 6, 7, 8 7 seg displays (through 220 ohm)
Pin 9 – Dip 3,4
Pin 10
Pin 11 - LDR through a 7K resistance.
Pin 12 Dip 1,2
Pin 13 Ch1
Pins 14, 15 and 16 7 seg displays (through 220 ohm)
Pin 17 Ch2
Pin 18 - no connection <200K to any 7-seg pin
Pin 19
Pin 20 Gnd
DIP switches 1,2 commoned
Both On – 6K to pin 3, 15K to pin 4
1 on, 2 off 7K and 16K
1 off, 2 on 7K and 16K
Both off – 14K and 21K
Dip switches 3,4 commoned
Both On – 6K to pin 3, 15K to pin 4
1 on, 2 off – 8K and 17K
1 off, 2 on - 7K and16K
Both off - 12.8K and 20.6K
(all resistances approximate as they are hard to measure on such closely grouped pins)
I've not measured all the 7 segments – 10 pins on each giving (10x10x10x10) is a lot of combinations! However they do seem to be reasonably consistent, but not all. The non-consistencies are probably enables and possibly the top segment you are having problems with.
The small 7-segment which only displays the sign seems to only be connected on one segment. It make sense that this is the middle segment and it is connected to pin 5. Hopefully this is consistent with your findings.
Assuming 2, 10, 18 and 19 are the 7 seg enables and are only connected when powered up, this agrees pretty well with the coding.
The only mystery is pins 3 and 4 - clearly related to the DIPs and hopefully the code will help out here.