Showing posts with label Projects. Show all posts
Showing posts with label Projects. Show all posts

P10(1R) Dot Matrix Display Interfacing With Arduino

 The dot matrix display that I have is P10(1R), 

Don’t worry about the upper section being empty, I later did program it to show text 


Actual display Board 

Back Part [ PCB ] 


It is P10(1R)-DP4 536-V5 Type 


The closest datasheet that I got for this is http://www.hlec.com.cn/userfiles/files/20120928014657.pdf 


These Large Display Boards have multiple Units cascaded together. I call each unit a Panel 

So Multiple Panels being chained together make a large display board 


Here is how my board and it panels are chained to form the large display 



The Blue colored Double lines are the long jumper wires that chains each panel with another 


Now here is more info related to the Display 

  • Pixels per Panel is 32 (W)*16 (H) dots 

  • The board has 4 panels per chain 

  • The board has 2 chains 

  • So 8 panels in total 

  • So the total resolution is 320(w)x32(h) 


The pin interface is called HUB12, I have interfaced it with Arduino Uno 


Marking on the PCB 

HUB12 pinout at the datasheet 

Arduino Uno Pin Interface 



Here is where How you should connect Arduino Uno with the Display 


So you connect the Arduino Uno to the HUB12 interface to the panel located at [0,0] position 

Notice Panel 4 is chained to Panel 5 HUB12 interface by long jumper wire 


The Connection between HUB12 and Arduino Uno is 

Ref: http://cdn.shopify.com/s/files/1/0045/8932/files/DMDCON_DMDConnector.pdf?100730 


HUB12

Arduino

nOE

9

A

6

B

7

CLK

13

SCLK

8

R_DATA

11

GND

GND 


MOST Important: Use an External power Supply like this to power up the Display Board. Arduino is just for applying the logic. Don’t ever think it can power up the display board 😄


Now let’s prepare the Arduino Code 

At first, we have to install the libraries 


  1. Download this library https://github.com/freetronics/DMD 


Extract it and copy it to the Arduino libraries folder for example in my case   “/home/ayx/Arduino/libraries” 

     

     2. Open Arduino IDE and Install “TImerOne” Library using the “manage libraries” option 


Open Dmd_demo.ino sketch 

Change The code snippet like this 


//SPI.h must be included as DMD is written by SPI
#include <SPI.h>       
#include <DMD.h>       
#include <TimerOne.h>  
#include "SystemFont5x7.h"
#include "Arial_black_16.h"
#include "Droid_Sans_24.h"

//Fire up the DMD library as dmd
#define DISPLAYS_ACROSS 4
#define DISPLAYS_DOWN 2
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);

void ScanDMD()
{
  dmd.scanDisplayBySPI();
}
void setup(void)
{
  Timer1.initialize( 3000 );//period in microseconds to call ScanDMD.
  Timer1.attachInterrupt( ScanDMD );//attach the Timer1 interrupt to scan
  dmd.clearScreen( true );    //clearthe DMD pixels held in RAM
  dmd.selectFont(Droid_Sans_24);
}
void loop(void)
{
  dmd.clearScreen( true );
  delay(2000);
  dmd.drawMarquee("Scrolling Text",14,(32*DISPLAYS_ACROSS)-1,6);
}


Compile it and upload you, if everything is okay then you will see a large text scrolling 


SPI (Serial Peripheral Interface ) communication between 2 AVR mcus

SPI stands for Serial Peripheral Interface

SPI  is a communication protocol used to communicate between microcontrollers and other devices, like other microcontrollers, external EEPROMs, DACs, ADCs, etc. With this interface, you have one Master device which initiates and controls the communication, and one or more slaves who receive and transmit to the Master

Project description 

This project shows SPI communication between 2 atmega8 mcus in which 1 atmega8 is master and the other one is a slave.

Here two MCU will transfer the byte to each other via SPI and will show the received byte at the output port

Sequence
  1. master atmega8 will transfer 112=01110000 to the slave atmega8
  2. slave atmega8 will transfer   21=00010101 to the master atmega8
  3. so master atmega8's PORTD should show 21=00010101
  4. So slave atmega8's PORTD should show 112=01110000
  5. master and slave prepare the data to be sent in their respective shift registers & the master generates the required clock pulses on the SCK line. MSB goes first.


ckt & codes are here : https://drive.google.com/file/d/0B8PCKc-8AIcDMEdOa3NwZnhVeWM/edit?usp=sharing




4x4 matrix keypad interfacing with atmega8

This project shows how 16 keys are multiplexed by 4x4 matrix way i.e no of rows: 4 & no of columns: 4 & interfaced with an AVR mcu. 

Atmega8 is used here along with a character LCD to show the pressed key value of the matrix keypad.



Dot Matrix Display interfacing with Microcontroller

" Sync electronics" - message is displayed at Dot matrix by scrolling using 74HC595 shift register .... the circuit given is just for showing how 2 dot matrix units should be connected to a microcontroller through the shift register. If more dot matrix displays are needed then more shift registers are needed. 

Note: Circuit will not simulate; the circuit is just for showing the connections required; one has to build the circuit in real and then test  

8*8 Dot matrix
5*7 Dot matrix


Ckt & codes are here : https://drive.google.com/file/d/0B8PCKc-8AIcDNjU3ZWc2ZEF0VDg/edit?usp=sharing




74HC595 shift Register interfacing with atmega8

This is a simple project for interfacing the 74HC595 shift register with the Atmega8 microcontroller. An 8bit pattern is displayed by writing 8bit unsigned int type data to 74HC595 ic 

this project will help understand multiple DOT matrix displays interfacing with the microcontroller.





Categories

Pages

Firmware Engineer

My photo
Works on Firmware, Embedded Linux, Smart Metering, RTOS, IoT backend

Contact Form

Name

Email *

Message *

Copyrighted by Hassin. Powered by Blogger.