| | Quote: | | | Posted by GoldDigger1950 | | | |
| Does it have any kind of part number on it at all?
| |
| | |
Yes it dose, KM 2408 but there is nothing on the net about it so I think that it was custom made for the manufacturer.
This is the code that controls a single digit, (used in FlowCode) my guess is that if I manipulate this code I'll be able to control it. I just want to let you know that it's purely out of curiosity that I'm looking at how to make this 7 segment work so I'll play around with it for a while, you just never know what may come out of it.
MX_UINT8 cSegmentValue = %a_SegmentArray[Value % 10];
if (DecimalPoint)
cSegmentValue = cSegmentValue & 0x7F; //Clear decimal point bit
//display the digit
#if (%a_COM_TYPE == 1) //Common Anode - Low = on, High = off
if (cSegmentValue & 0x01)
{
FC_CAL_Bit_High_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN0);
}
else
{
FC_CAL_Bit_Low_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN0);
}
if (cSegmentValue & 0x02)
{
FC_CAL_Bit_High_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN1);
}
else
{
FC_CAL_Bit_Low_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN1);
}
if (cSegmentValue & 0x04)
{
FC_CAL_Bit_High_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN2);
}
else
{
FC_CAL_Bit_Low_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN2);
}
if (cSegmentValue & 0x08)
{
FC_CAL_Bit_High_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN3);
}
else
{
FC_CAL_Bit_Low_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN3);
}
if (cSegmentValue & 0x10)
{
FC_CAL_Bit_High_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN4);
}
else
{
FC_CAL_Bit_Low_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN4);
}
if (cSegmentValue & 0x20)
{
FC_CAL_Bit_High_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN5);
}
else
{
FC_CAL_Bit_Low_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN5);
}
if (cSegmentValue & 0x40)
{
FC_CAL_Bit_High_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN6);
}
else
{
FC_CAL_Bit_Low_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN6);
}
if (cSegmentValue & 0x80)
{
FC_CAL_Bit_High_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN7);
}
else
{
FC_CAL_Bit_Low_DDR(%a_SEG_PORT, %a_SEG_TRIS, %a_SEG_PIN7);
}
FC_CAL_Bit_High_DDR(%a_COM_PORT, %a_COM_TRIS, %a_COM_PIN);
#endif
Linkback: You are not allowed to view links.
Please Register or Login
http://www.thunting.com/smf/index.php/topic,59659.msg291215.html#msg291215
Xavier