32x64 Dot matrix RGB panel with ATMega16

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello all, I am interfacing 32x64 P5 RGB panel with ATMega16. Display is working fine except this one problem, what ever I display in row "0" it is repeatedly displayed in row"8" and so on for further rows. Is there any way to address exactly one row at a time? Please suggest what should I do?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

sidk wrote:

Please suggest what should I do?

 

How about telling us about your project?

 

1) Why have you not posted your code?

2) Why have you not posted your schematic?

3) Why have you not told us what 'RGB panel' you are using?

 

..remember, we can't read your mind.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

Last Edited: Tue. Sep 15, 2020 - 06:36 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
//Pin definitions
#define col_port PORTD
#define R1  PD0
#define G1  PD1
#define B1  PD2
#define R2  PD3
#define G2  PD4
#define B2  PD5

#define dat_port PORTA
#define A   PA0
#define B   PA1
#define C   PA2
#define D   PA3

#define LAT PA4
#define CLK PA5
#define OE  PA6

Array I am printing

uint8_t _temp[]={0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //Display required only in first row of panel

Main loop used for printing

while(1)
{
	line=0;
	for(_disp_delay=0; _disp_delay<50; _disp_delay++)
	{
		value =
		(uint64_t)(_temp[_index++]) << 56 |
		(uint64_t)(_temp[_index++]) << 48 |
		(uint64_t)(_temp[_index++]) << 40 |
		(uint64_t)(_temp[_index++]) << 32 |
		(uint64_t)(_temp[_index++]) << 24 |
		(uint64_t)(_temp[_index++]) << 16 |
		(uint64_t)(_temp[_index++]) << 8	|
		(uint64_t)(_temp[_index++]);
		shift(TurnBitsAround(value));
		
		if(_index >= 8)
		{
			_index=0;
		}
	}
}

Display function used

void shift(uint64_t data){
// data=0;
		dat_port &= (~(1<<OE));
		for (uint8_t n=0; n<64; n++) {
			col_port=0x00;
			if( ((uint64_t)1<<n) & data ){
  				col_port &= (~(1<<R1));
  				col_port &= (~(1<<G1));
  				col_port &= (~(1<<B1));
				col_port |= (1<<R1);     //Red Color only
				
			}
		        dat_port |= (1<<OE);
			dat_port &= (~(1<<CLK));
			dat_port |= (1<<CLK);
		}

 		dat_port &= (~(1<<LAT));
		dat_port |= (1<<LAT);

		dat_port |= (1<<OE);
		dat_port |= (line & 0x0F);	//Set Line number
		dat_port &= (~(1<<OE));
		
	}

The panel I am using is https://www.amazon.co.uk/outdoor-waterproof-display-320x160mm-module/dp/B07G849F38

HUB75 connected with wires as per pin definition given above. 

Please suggest how do I address individual row at a time? Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sidk wrote:
what ever I display in row "0" it is repeatedly displayed in row"8" and so on

and the description of that says:

P5 outdoor waterproof full color led display 64x32 pixel 320x160mm panel 1/8 scan smd 2727 rgb p5 led module video wall HD panel

 

I know nothing about these things, but could that "1/8 scan"  be a clue ... ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, Yes it is, But I am also new to these displays and want to know the mechanism to address individual row. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sidk wrote:
I am also new to these displays

So have you googled to find information about them? examples? tutorials? etc?

 

That's a basic first step when starting with any new thing ...

 

EDIT

 

Where AVRs are concerned, adding "Arduino" to your search term is usually a good start; eg

 

https://www.google.com/search?q=%2Barduino+P5++full+color+led+display++panel

 

which leads to things like

 

https://create.arduino.cc/projecthub/CamelCaseName/running-a-32x64-rgb-led-panel-with-only-an-arduino-nano-c19385

 

https://learn.sparkfun.com/tutorials/rgb-panel-hookup-guide/all

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. Sep 15, 2020 - 08:38 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes I have googled and as I mentioned that I am writing the above code in that I need assistance in finding out HOW to address the individual ROW. Thanks for showing the links I have been through. I hope to get helpful answers please!! 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sidk wrote:
HOW to address the individual ROW.

Surely, that must be shown in those links - they must do it?

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

https://www.sparkfun.com/news/26...

 

 

As such, you don't address the individual row - the row data is shifted in serially so you shift in all the row data. You can access an individual led by manipulating the data array in memory that you shift out to the display.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for the kind reply Kartman. Yes I had read this article but things were still not working for me after digging in I figured out that the pixels position in my case was different. Conclusion: every dot matrix display does not have the same arrangement. The technique I used to access a row was same as mentioned in the article, shift serial bits to two rows at a time that means selecting x row will select x and x+8 row at the same time, write data in both of these rows. Thanks to humble replies only.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is the question answered?