Construction of Word Clock v1

Rasprava o AVR mikrokontrolerima, AVR projekti i drugo vezano za AVR...

Moderators: pedja089, stojke369, trax, InTheStillOfTheNight

Post Reply
robertholmberg
Posts: 8
Joined: 16-03-2014, 22:24

Re: Construction of Word Clock v1

Post by robertholmberg »

More pictures.

/Robert
Attachments
Max7219 Under
Max7219 Under
IMG_9439.JPG (60.9 KiB) Viewed 16686 times
Max7219 no 4
Max7219 no 4
IMG_9437.JPG (47.9 KiB) Viewed 16686 times
Max7219 no 4
Max7219 no 4
IMG_9436.JPG (39.51 KiB) Viewed 16686 times
Max7219 no 4
Max7219 no 4
IMG_9435.JPG (51.65 KiB) Viewed 16686 times
vszabi
Posts: 17
Joined: 03-10-2013, 13:08

Re: Construction of Word Clock v1

Post by vszabi »

robertholmberg wrote:More pictures.

/Robert

Robert huh!
That's pretty harsh! With the many cords do something urgent! I used to use tape ribbon cable. I think it's so gather all kinds of electrical noise! The crystals and 22pF can be closer to each other. The 2 amp power adapters plenty enough, mine also has a USB cell phone charger. (about 800 mA)
robertholmberg
Posts: 8
Joined: 16-03-2014, 22:24

Re: Construction of Word Clock v1

Post by robertholmberg »

Haha,

Hmm, was it that bad? I will try to clean it all up if i got time tomorrow, and I guess that the most important one to make short and clean is the three signal cables sending the data from the chips to eachother?

/Robert
vszabi
Posts: 17
Joined: 03-10-2013, 13:08

Re: Construction of Word Clock v1

Post by vszabi »

robertholmberg wrote:Haha,

Hmm, was it that bad? I will try to clean it all up if i got time tomorrow, and I guess that the most important one to make short and clean is the three signal cables sending the data from the chips to eachother?

/Robert

Yes, the chip is wired up to do something with absolute guess. There is no ribbon? I used a ribbon cable used pc.

Szabi
vszabi
Posts: 17
Joined: 03-10-2013, 13:08

Re: Construction of Word Clock v1

Post by vszabi »

Some pictures of my solution.
Attachments
P1020813.jpg
P1020813.jpg (32.43 KiB) Viewed 16657 times
P1020812.jpg
P1020812.jpg (32.6 KiB) Viewed 16657 times
P1020810.jpg
P1020810.jpg (31.42 KiB) Viewed 16657 times
P1020809.jpg
P1020809.jpg (30.97 KiB) Viewed 16657 times
P1020808.jpg
P1020808.jpg (26.12 KiB) Viewed 16657 times
vszabi
Posts: 17
Joined: 03-10-2013, 13:08

Re: Construction of Word Clock v1

Post by vszabi »

Some pictures of my solution.
Attachments
P1020689.jpg
P1020689.jpg (28.8 KiB) Viewed 16655 times
P1020688.jpg
P1020688.jpg (29.35 KiB) Viewed 16655 times
P1020687.jpg
P1020687.jpg (20.79 KiB) Viewed 16655 times
P1020816.JPG
P1020816.JPG (22.92 KiB) Viewed 16655 times
P1020815.jpg
P1020815.jpg (30.68 KiB) Viewed 16655 times
vszabi
Posts: 17
Joined: 03-10-2013, 13:08

Re: Construction of Word Clock v1

Post by vszabi »

Some pictures of my solution.
Attachments
P1020819.jpg
P1020819.jpg (5.66 KiB) Viewed 16653 times
P1020818.jpg
P1020818.jpg (4.53 KiB) Viewed 16653 times
P1020708.jpg
P1020708.jpg (21.47 KiB) Viewed 16653 times
P1020693.jpg
P1020693.jpg (23.18 KiB) Viewed 16653 times
P1020690.jpg
P1020690.jpg (31.03 KiB) Viewed 16653 times
robertholmberg
Posts: 8
Joined: 16-03-2014, 22:24

Re: Construction of Word Clock v1

Post by robertholmberg »

Hi,

I havent had time to test it properly and will not until next week, i did the worst corner and replaced it with such a cable which i have plenty of, and i think it might have been the problem.

Thanks for the input. And will be back with the result.

/Robert
romi
Posts: 7
Joined: 15-04-2014, 01:11

Re: Construction of Word Clock v1

Post by romi »

Hello
How do I add additional characters to the file font_7x5.h
for example, the following
0x04, 0x2A, 0x6A, 0xAA, 0x10,
but this character is not displayed
User avatar
trax
Administrator sajta
Administrator sajta
Posts: 3509
Joined: 08-01-2005, 18:04
Location: 75k, BA
Contact:

Re: Construction of Word Clock v1

Post by trax »

You should replace some character that you are not using with that bitmap (your new 5 bytes). That's what I did with character for temperature degree symbol. Look for it in font_7x5.h file and do the same!
romi
Posts: 7
Joined: 15-04-2014, 01:11

Re: Construction of Word Clock v1

Post by romi »

Witam
Co bym musiał zmienic w programie, żeby dodać jeszcze jeden MAX (64 Diod)
Dodam, że nie znam sie na programowaniu

Hello
What would I have to change in the teeth add one MAX (64 Diodes)
I would add that it does not know much about programming
Attachments
ZEGAR.jpg
ZEGAR.jpg (106.1 KiB) Viewed 16305 times
User avatar
trax
Administrator sajta
Administrator sajta
Posts: 3509
Joined: 08-01-2005, 18:04
Location: 75k, BA
Contact:

Re: Construction of Word Clock v1

Post by trax »

Hello,

It can be done, but you will need to find someone to help you with the code. I really don't have enough time right now, sorry.

Best regards,
Trax
romi
Posts: 7
Joined: 15-04-2014, 01:11

Re: Construction of Word Clock v1

Post by romi »

Ok
Thank you
romi
Posts: 7
Joined: 15-04-2014, 01:11

Re: Construction of Word Clock v1

Post by romi »

Hello
I've added yet another layout MAX7219
in the file " lang " Now I

Code: Select all

// MAX 2	// MAX 3
	0b00000000, 0b00000000,		// not on display
	0b00000000, 0b00000000,		// not on display
	0b00000000, 0b00000000,
	0b00000000, 0b00000000,
	0b00000000, 0b00000000,
	0b00000000, 0b00000000,
	0b00000000, 0b00000000,
	0b00000000, 0b00000000,
	// MAX 1	// MAX 4
	0b00000000, 0b00000000,
	0b00000000, 0b00000000,
	0b00000000, 0b00000000,
	0b00000000, 0b00000000,
	0b00000000, 0b00000000,
	0b00000000, 0b00000000,
	0b00000000, 0b00000000,
	0b00000000, 0b00000000,
	// MAX 5
	0b00000000,
	0b00000000,
	0b00000000,
	0b00000000,
	0b00000000,
	0b00000000,
	0b00000000,
	0b00000000,
and in " wc.c " changed to this piece of code :

Code: Select all

// fetch the appropriate arrays from PGM space into RAM
	char hour_arr[40];
	memcpy_P(hour_arr, (PGM_P)pgm_read_word( &MAX_h[time_h-1] ), 40);
	char minute_arr[40];
	memcpy_P(minute_arr, (PGM_P)pgm_read_word( &MAX_m[time_m] ), 40);

	// turn ON current hour's LEDs for all MAXs that might have an ON LED for this hour
	// we will turn ON current minute's LEDs also here
	// we do that 8 times for each MAX, for each "column" of data, even though it is actually row data because that's how I soldered the LEDs :(
	for(uint8_t i=0; i<8; i++)
	{
		// MAX 1
		display_matrix[0][i] |= hour_arr[16+(i*2)]	| minute_arr[16+(i*2)];		// turn ON hours & minutes that need to be ON for this MAX
		// MAX 2
		display_matrix[1][i] |= hour_arr[i*2]		| minute_arr[i*2];			// turn ON hours & minutes that need to be ON for this MAX
		// MAX 3
		display_matrix[2][i] |= hour_arr[(i*2)+1]	| minute_arr[(i*2)+1];		// turn ON hours & minutes that need to be ON for this MAX
		// MAX 4
		display_matrix[3][i] |= hour_arr[17+(i*2)]	| minute_arr[17+(i*2)];		// turn ON hours & minutes that need to be ON for this MAX
		// MAX 5
		display_matrix[4][i] |= hour_arr[24+(i*2)]	| minute_arr[24+(i*2)];	   // turn ON hours & minutes that need to be ON for this MAX
		
	}
And something is wrong because it shows me only one half
Where can be a problem

sorry for my English
Translated by Google Translate
romi
Posts: 7
Joined: 15-04-2014, 01:11

Re: Construction of Word Clock v1

Post by romi »

Hello
This display ok
lang file I have now :

Code: Select all

// MAX 2     // MAX 3   // MAX 6
	0b00000000, 0b00000000, 0b00000000,   // not on display
	0b00000000, 0b00000000 ,0b00000000,   // not on display
	0b00000000, 0b00000000 ,0b00000000,
	0b00000000, 0b00000000 ,0b00000000,
	0b00000000, 0b00000000 ,0b00000000,
	0b00000000, 0b00000000 ,0b00000000,
	0b00000000, 0b00000000 ,0b00000000,
	0b00000000, 0b00000000 ,0b00000000,
	// MAX 1    // MAX 4    // MAX 5
	0b00000000, 0b00000000, 0b00000000,
	0b00000000, 0b00000000,	0b00000000, 
	0b00000000, 0b00000000,	0b00000000, 
	0b00000000, 0b00000000,	0b00000000, 
	0b00000000, 0b00000000,	0b00000000, 
	0b00000000, 0b00000000,	0b00000000, 
	0b00000000, 0b00000000,	0b00000000, 
	0b00000000, 0b00000000,	0b00000000, 
wc.c file I have now:

Code: Select all

// MAX 1
		display_matrix[0][i] |= hour_arr[24+(i*3)]	| minute_arr[24+(i*3)] 	 | sekundy_arr[24+(i*3)];	   // turn ON hours & minutes that need to be ON for this MAX
		// MAX 2
		display_matrix[1][i] |= hour_arr[i*3]		| minute_arr[i*3] 	 | sekundy_arr[i*3];	           // turn ON hours & minutes that need to be ON for this MAX
		// MAX 3
		display_matrix[2][i] |= hour_arr[(i*3)+1]	| minute_arr[(i*3)+1]  	 | sekundy_arr[(i*3)+1];	   // turn ON hours & minutes that need to be ON for this MAX
		// MAX 4
		display_matrix[3][i] |= hour_arr[25+(i*3)]	| minute_arr[25+(i*3)] 	 | sekundy_arr[25+(i*3)];	   // turn ON hours & minutes that need to be ON for this MAX
		// MAX 5
		display_matrix[4][i] |= hour_arr[26+(i*3)]      | minute_arr[26+(i*3)]   | sekundy_arr[26+(i*3)];          // turn ON hours & minutes that need to be ON for this MAX
		// MAX 6
		display_matrix[5][i] |= hour_arr[(i*3)+2]	| minute_arr[(i*3)+2] | sekundy_arr[(i*3)+2];              // turn ON hours & minutes that need to be ON for this MAX
Now is good. But I do not know how to change that date is displayed on the 3 MAX.
(MAX 1 MAX2 MAX3)
How to find moments of time colleague and was to be able to help me with the code be incorporated
User avatar
trax
Administrator sajta
Administrator sajta
Posts: 3509
Joined: 08-01-2005, 18:04
Location: 75k, BA
Contact:

Re: Construction of Word Clock v1

Post by trax »

Hello,
I am currently very busy so I can't help you right now. Maybe there is someone else that can take a look at the code here?
Regards!
romi
Posts: 7
Joined: 15-04-2014, 01:11

Re: Construction of Word Clock v1

Post by romi »

That I can not find anyone to help with the processing of code: (
Practically just about displaying the date and progressbar on 3max, I know more or less an every where change, but l can not do that, everything else is ok
It's hard I'll keep looking maybe someone from this forum will help.
romi
Posts: 7
Joined: 15-04-2014, 01:11

Re: Construction of Word Clock v1

Post by romi »

Hello
I know that my friend does not have time right now, but if you can help me with display_progressbar that was displayed on three MAX7219.
Everything else I was able to somehow change the method of trial and error, but this can not cope.

Code: Select all

// progressbar, top part of display
void display_progressbar(uint8_t value, uint8_t maximum)
{
	uint8_t rot = ((16/ maximum) * value) +0; // how many times to rotate right
	uint32_t pb = 0xffff0000; // as it rotates right, we "make more progress" :)
	pb = pb >> rot; // moved to the right as much as required

	// move once more because it is odd and at maximum
	if( maximum==value && value%2 ) pb = pb >> 1;

	// lets put this progressbar into the display_matrix
	// we put byte 0 to MAX 3, and byte 1 to MAX 2, and we ignore two MSB bytes of "pb"
	uint8_t pb_MAX3 = (uint8_t)pb;
	uint8_t pb_MAX2 = (uint8_t)( pb >> 8 );

	// skip first two rows, they are used for dots. also don't draw the bottom line...
	for(uint8_t i=2; i<8-1; i++)
	{
		display_matrix[1][i] = pb_MAX2;
		display_matrix[2][i] = pb_MAX3;
	}

	// send the "display matrix" to all MAXes on the bus
	max72xx_send_matrix();

	return;
}
MAX2→MAX3 . MAX6
...↑.......↓......↑
MAX1 . MAX4→MAX5

I tried this:

Code: Select all

// progressbar, top part of display
void display_progressbar(uint8_t value, uint8_t maximum)
{
	uint8_t rot = ((24 / maximum) * value) +0; // how many times to rotate right
	uint32_t pb = 0xffff0000; // as it rotates right, we "make more progress" :)
	pb = pb >> rot; // moved to the right as much as required

	// move once more because it is odd and at maximum
	if( maximum==value && value%2 ) pb = pb >> 1;

	// lets put this progressbar into the display_matrix
	// we put byte 0 to MAX 3, and byte 1 to MAX 2, and we ignore two MSB bytes of "pb"
	uint8_t pb_MAX3 = (uint8_t)pb;
	uint8_t pb_MAX2 = (uint8_t)( pb >> 8 );
	uint8_t pb_MAX6 = (uint8_t)( pb >> 16 );

	// skip first two rows, they are used for dots. also don't draw the bottom line...
	for(uint8_t i=2; i<8-1; i++)
	{
		display_matrix[1][i] = pb_MAX2;
		display_matrix[2][i] = pb_MAX3;
		display_matrix[5][i] = pb_MAX6;
	}

	// send the "display matrix" to all MAXes on the bus
	max72xx_send_matrix();

	return;
}
but it is not working as it should
MIICHALUS
Posts: 3
Joined: 30-03-2015, 14:12

Re: Construction of Word Clock v1

Post by MIICHALUS »

Hello

Does enybody can help me??
I dont know how to adjust functions responsible for the rows and columns.I tried everything and still is not right.I attached photo of my hardware connection
Attachments
8x8..jpg
8x8..jpg (65.25 KiB) Viewed 15282 times
6x8..jpg
6x8..jpg (62.04 KiB) Viewed 15282 times
User avatar
trax
Administrator sajta
Administrator sajta
Posts: 3509
Joined: 08-01-2005, 18:04
Location: 75k, BA
Contact:

Re: Construction of Word Clock v1

Post by trax »

Hello,

Have you read the first page of this topic? There is an explanation on how to identify rows and columns. It is not *that* easy though, but it can be done in couple of minutes :(

Trax
Post Reply