no, theres a memory location that contains the raw on off bits for each segment. its just a 10 element byte array. when i dump it to the terminal, the first character never matches the other 9. it should because i sent the same one for all 10. when i write to the first segment the same thing happens as when i write out to the second, the only difference is that another chip decides which one of the displays has power at the time. you iterate over the 10 entries in the display buffer, output its contents to the shift register, latch it, and enable the outputs. then you set one turn on one of the displays.
the hardware is just an led multiplexing circuit. the grounds for the displays are all wired in an 8 bit bus to a shift register, and when one of the pins is low, current is allowed to flow through that segment. if you were to power all 10 displays (you really shouldn't do that though) then they would all display the same digit. but because only one anode pin is connected to 5v at any given time, only one display is on. i just output a number to the shift register, turn the display on by powering its anode, turn it off again, and load the next number to the shift register, repeat until all 10 have been output. then the code turns everything off and sees if there is any input from the serial port. this all happens so fast that it looks like all displays are lit simultaneously.
switching the displays on is handled by 6 outputs, a 3-bit select and an on/off bit controls 8 of the 10 displays with a 3-8 line decoder, it is impossible for more than one of them to be on at the same time. however since i have 10 displays, i need 2 extra pins, these are connected directly, and i can turn them on or off at will. there are some mosfets that actually supply the current, as the logic cant source much current by itself, so these are what actually recieve the data. i have a function that takes a number n between 0 and 9, if its n>=0 and n<8, i enable the line decoder and output the 3 down its select lines, if n==8, i turn off the decoder and power one of the extra segments and if n==9 i power the other. i dont see any issues there. its a fairly basic conditional.
i suspect the serial protocol is flawed. its a convoluted mess. its probibly not putting the right bytes in the right place, or my terminal program is putting in bytes that i do not want betwen the command byte and the data. the serial interface is also for testing, i intend to use an i2c interface instead. so its not a big deal to just wait for the rewrite, if this is in fact where the problem lies. i did perform a hardware test, i swapped the drive wires for the first 2 displays, the result was that the second display was wrong and the first one was right. this confirms that everything downstream of the displays is working. i also inserted a lengthy delay to the loop so i could watch the drive order, and only one display was on at any given time and in the proper sequence. so thats working. it has to be a software problem.
i dont have time to work on it, i have a boat to catch in a couple hours and im still not packed.