MAX 7219 with DP

Hi Guys,
I need some help and i think it’s an easy fix for someone who knows what to do. I am working on a counter with 4 x 7 segments and it works well, the only problem i have is to display the DP on the second 7 segment all the time. Below is my code. I have tried using

lc.setDigit(0,1,’,’,true) which display the decimal point but the number on that segment doesn’t come on.

#include <LedControl.h>

LedControl lc=LedControl(12,11,10,1); // lc is our object
// pin 12 is connected to the MAX7219 pin 1
// pin 11 is connected to the CLK pin 13
// pin 10 is connected to LOAD pin 12
// 1 as we are only using 1 MAX7219

int pulsein=2; //pulse input from digital 2
int val; //val to store state of the input pin
int count=0; //count the number of pulses
int pulseState=0; //variable to hold pulse state
int pulseLED=4; //LED to indicate pulse input
float ones; //first digit on 7 segment
int twos; //second digit on 7 segment
int threes; //third digit on 7 segment
int fours; //fourth digit on 7 segment
int ledState=LOW; //ledState use to set LED
int LED=0;

void setup()
{
pinMode(pulsein,INPUT); //set pulsein as input
pinMode(pulseLED,OUTPUT); //set pulseLED as output

pulseState = digitalRead(pulsein); //read the initial state

// the zero refers to the MAX7219 number, it is zero for 1 chip
lc.shutdown(0,false);// turn off power saving, enables display
lc.setIntensity(0,8);// sets brightness (0~15 possible values)
lc.clearDisplay(0);// clear screen

}

void loop()
{

val=digitalRead(pulsein); //read pulse and store in val

//to count number of pulses
if (val != pulseState)
{
if(val==LOW)
{
ones++
}

if(ones>=10){
ones=0;
twos++;
}

if(twos==10){
twos=0;
threes++;
}

if(threes==10){
threes=0;
fours++;
}

if(fours==10){
ones=0;
twos=0;
threes=0;
fours=0;

}

lc.setDigit(0,0,ones,false);
lc.setDigit(0,1,twos,false);
lc.setDigit(0,2,threes,false);
lc.setDigit(0,3,fours,false);

}

pulseState=val; //saves the new state in val
}

Why don't you just hook it up like you would any other LED? You have other pins on your arduino.

Hi, I would have "hacked" the dp if i used individual 7 segments, but i to save spave and minimised pins for the 7 segments, i used a Quad 7 segment unit. So i am not able to "hack" individual pin.

Anyway, i managed to solve the problem. i changed the following

lc.setDigit(0,1,twos,false); to lc.setDigit(0,1,twos,true);

added another line lc.setChar(0,1,'.',true);

now i get the decimal point and numbers.

Problem solved.