OverLoad Source Code Release

Now we have  the OverLoad in stock, here we release the source code (Beta) and the schematic of this open source electronic dummy load.

 

Features

  • 3A – 12V adjustable electronic dummy load, 10mA and 10mV resolution
  • ±30V Voltmeter, 10mV resolution
  • ±3A Ammeter, 30mV resolution
  • Base on Arduino (ATMega328P) , hardware and software open source

Download the schematic here:

  sch-overload_V1.0 (unknown, 658 hits)

Download the source code here:

  OverLoad_Firmware_VBeta (17.0 KiB, 424 hits)

Initialization For ILI9325C ILI9325D ILI9327 And HX8347-A

Now the ILI9325C display controller chip has been discontinued and now the available  and alternative model is ILI9325D.

Our ITDB02-2.4 LCD use the ILI9325 chip for display controlling, so LCD module from now on will be use the new ILI9325D chip and the model will update to ITDB02-2.4D ,to  distinction with the previous model which use the ILI9325C.

They are exactly the same chip, but just a slightly different in the Initial setup. If you use the same Initial setup for them , the LCD will work but maybe slight flicker than with the right code. So we will publish out the two initiation step for both model , and update the ITDB02 library to compatible with new model. But for some third-party library for this LCD module, you may need to do this small change yourself. You can fine the initialization step below:

Initialization Step of ILI9325C

Continue reading

Colorduino Schematic and Demo Code

Now we are back to work after our long Spring Festival Holiday. Before the holiday we have received some applications and shipped out 3 samples, now we are processing with the applications that during the holiday, we will release out the rest samples after the holiday.

Here we provide a sample demo project for Colorduino, and you can download the schematic and datasheet of the DM163 here:

Colorduino Demo

  Colorduino Demo (5.3 KiB, 984 hits)

Colorduino schematic v1.2

  Colorduino Schematic (26.3 KiB, 1,116 hits)

DM163 datasheet

  DM163 datasheet (1.2 MiB, 662 hits)

IFLAT32 nRF24L01+ Library & Demo

We make a nRF24L01 wireless library for IFLAT32, then you can plug the nRF24L01 module on the IFLAT32 and  use this library to drive wireless module for communication.

The v1.0 version just provide you some basis function which to initial the module , set the power, speed and so on.

Functions:
void nRF24L01_HW_Init(void)
This function is used to initial the hardware setting of the module, it should be used at the beginning of you main code.
 
unsigned char nRF24L01_Config(unsigned char freq,unsigned char power,unsigned char rate)
This function is used to configure some setting of the module like frequent, power and speed.
Parameters:
unsigned char freq: set the frequent , can be 0-120 , means (2400+ freq)M, so you can let the module work in 2.4G to 2.52G
unsigned char power: set the power , it should be ‘P0dBm’,’P6dBm’,’P12dBm’ or ‘P18dBm’
unsigned char rate: set the transmit speed, should be ‘R2mbps’, ‘R2mbps’ or ‘R125kbps’
 
void nRF24L01_Set_TX_Address(unsigned char A,unsigned char B,unsigned char C,unsigned char D,unsigned char E)
void nRF24L01_Set_RX_Address(unsigned char A,unsigned char B,unsigned char C,unsigned char D,unsigned char E)
Set the hardware address of TX and RX. Each parameter can be 0×00 to 0xFF

Continue reading

ENC28J60 Ethernet Module And Demo Codes

The ENC28J60 Ethernet Module utilizes the new Microchip ENC28J60 Stand-Alone Ethernet Controller IC featuring a host of features to handle most of the network protocol requirements. The board connects directly to most microcontrollers with a standard SPI interface with a transfer speed of up to 20MHz.

 

Basic Features:
  • ENC28J60 Ethernet chips, SOP28 package
  • SPI Interface
  • 1×10 connector, can be easily mounted with the MCU
  • Built-in isolation transformer RJ45 connectors HR911102A
  • Power LED
  • Single Supply: +3.3 V
  • 25Mhz Crystal
  • PCB size: 55×36 mm

Here we provide some demo codes for different microcontrollers, the zip includes 8051, ATmega48, STM32 and LPC2103 project. Download it here :

  ENC28J60 Demo Code (1.4 MiB, 1,829 hits)

Here is a Open-source TCP/IP stack — available as an Arduino library :

  Open-source TCP/IP stack -- available as an Arduino library (40.2 KiB, 957 hits)

ITDB02 Touch Screen Handwrite Demo

Today we show a demo that use the Arduino to control the ITDB02-2.4 display , and used the touch screen to achieve handwrite function.

The LCD connection is the same as that in “ITDB02-2.4 8Bit Mode Demo“, and the touch screen connection is :
DCLK to D14(A0) pin of Arduino
CS to D15(A1) pin of Arduino
DIN to D16(A2)  pin of Arduino  
DOUT to D18(A4) pin of Arduino
IRQ to D19(A5) pin of Arduino

Continue reading

nRF24L01 Six Channels To One Receiver

nRF24L01 support multi-channel data receive , so you can use several nRF24L01 node to transmit data to a terminal receiver .

We have build a sensor network demo, which used 6 sensor node and send the data to one receiver. The operation of controlling nRF24L01 is similar to the point to point demo.  The demo just use the button to trigger the data transmit but not really read the sensor .

To achieve receiving data from 6 channels , there are a few points to  note:
  1. EN_AA and EN_RXADDR register :should be set to 0×3F , enable auto-answer and allow receive data from all channels.
  2. RX_PW_PN registers : default is 0, set for the max length of received data .
  3. Address for channel P0- P1 is 40 bit, but the address of P2- p5 is 8 bit , the high 32bit is the same as P1 , so just need to write one byte address for P2 -P5. And remember that the low address should be written first.

You can download the demo project here :

  nRF24L01 Six Channels To One Receiver (8.1 KiB, 1,013 hits)

It includes 2 parts : one for the sensor nodes , and the other for the receiver . The project is build by Keil and it’s for C8051. We are building a new one which for Arduino and nodes will really read back the temperature information and display in LCD by receiver.

Continue reading

ITDB02-2.4 8Bit Mode Demo

We have showed how to use the Arduino control the ITBD02 for refreshing the screen , but the demo is in 16 bit mode , we received some E-mail require the 8 Bit mode demo, so we now publish the new demo which using the Arduino to control the ITDB02-2.4 display a picture in 8 bit mode.

The connection is :
DB9 – DB16 to D0 – D7 of Arduino ; DB0 – DB8 to GND
RS to D8 ; WR to D9 ; RD to 3.3V
CS to D10 ; RESET to D11 ; LDEA to 3.3V
VCC to 5V; GND to GND

Download the code below into Arduino :

#include <avr /pgmspace.h>
 
#define LCD_RS 8         
#define LCD_WR 9      
#define LCD_CS 10       
#define LCD_REST 11
 
extern unsigned char image[3200];
 
void LCD_Writ_Bus(char VH,char VL)   
{   
  unsigned char i,temp,data; 
  data=VH; 
  for(i=0;i&lt;8;i++)
  {
    temp=(data&0x01);
    if(temp)
      digitalWrite(i,HIGH);
    else
      digitalWrite(i,LOW);
    data=data>>1;
  }
  digitalWrite(LCD_WR,LOW);
  digitalWrite(LCD_WR,HIGH);
  data=VL;
  for(i=0;i&lt;8;i++)
  {
    temp=(data&0x01);
    if(temp)
      digitalWrite(i,HIGH);
    else
      digitalWrite(i,LOW);
    data=data>>1;
  }		
  digitalWrite(LCD_WR,LOW);
  digitalWrite(LCD_WR,HIGH);
}
 
 
void LCD_Write_COM(char VH,char VL)  //发送命令
{   
  digitalWrite(LCD_RS,LOW);
  LCD_Writ_Bus(VH,VL);
}
 
 
void LCD_Write_DATA(char VH,char VL)    //发送数据
{
  digitalWrite(LCD_RS,HIGH);
  LCD_Writ_Bus(VH,VL);
}
 
void Address_set(unsigned int x1,unsigned int y1,unsigned int x2,unsigned int y2)
{
  LCD_Write_COM(0x00,0x20);
  LCD_Write_DATA(x1>>8,x1);    
  LCD_Write_COM(0x00,0x21);
  LCD_Write_DATA(y1>>8,y1);   
  LCD_Write_COM(0x00,0x50);
  LCD_Write_DATA(x1>>8,x1);   
  LCD_Write_COM(0x00,0x52);
  LCD_Write_DATA(y1>>8,y1);   
  LCD_Write_COM(0x00,0x51);
  LCD_Write_DATA(x2>>8,x2);  
  LCD_Write_COM(0x00,0x53);
  LCD_Write_DATA(y2>>8,y2);   
  LCD_Write_COM(0x00,0x22);           				 
}
 
void LCD_Init(void)
{
 
  digitalWrite(LCD_REST,HIGH);
  delay(5); 
  digitalWrite(LCD_REST,LOW);
  delay(5);
  digitalWrite(LCD_REST,HIGH);
  delay(5);
 
  digitalWrite(LCD_CS,LOW);  
  //************* Start Initial Sequence **********//
  LCD_Write_COM(0x00,0xE5); 
  LCD_Write_DATA(0x78,0xF0); // set SRAM internal timing
  LCD_Write_COM(0x00,0x01); 
  LCD_Write_DATA(0x01,0x00); // set SS and SM bit
  LCD_Write_COM(0x00,0x02); 
  LCD_Write_DATA(0x07,0x00); // set 1 line inversion
  LCD_Write_COM(0x00,0x03); 
  LCD_Write_DATA(0x10,0x30); // set GRAM write direction and BGR=1.
  LCD_Write_COM(0x00,0x04); 
  LCD_Write_DATA(0x00,0x00); // Resize register
  LCD_Write_COM(0x00,0x08); 
  LCD_Write_DATA(0x02,0x07); // set the back porch and front porch
  LCD_Write_COM(0x00,0x09); 
  LCD_Write_DATA(0x00,0x00); // set non-display area refresh cycle ISC[3:0]
  LCD_Write_COM(0x00,0x0A); 
  LCD_Write_DATA(0x00,0x00); // FMARK function
  LCD_Write_COM(0x00,0x0C); 
  LCD_Write_DATA(0x00,0x00); // RGB interface setting
  LCD_Write_COM(0x00,0x0D); 
  LCD_Write_DATA(0x00,0x00); // Frame marker Position
  LCD_Write_COM(0x00,0x0F); 
  LCD_Write_DATA(0x00,0x00); // RGB interface polarity
  //*************Power On sequence ****************//
  LCD_Write_COM(0x00,0x10); 
  LCD_Write_DATA(0x00,0x00); // SAP, BT[3:0], AP, DSTB, SLP, STB
  LCD_Write_COM(0x00,0x11); 
  LCD_Write_DATA(0x00,0x07); // DC1[2:0], DC0[2:0], VC[2:0]
  LCD_Write_COM(0x00,0x12); 
  LCD_Write_DATA(0x00,0x00); // VREG1OUT voltage
  LCD_Write_COM(0x00,0x13); 
  LCD_Write_DATA(0x00,0x00); // VDV[4:0] for VCOM amplitude
  LCD_Write_COM(0x00,0x07); 
  LCD_Write_DATA(0x00,0x01);
  delay(50); // Dis-charge capacitor power voltage
  LCD_Write_COM(0x00,0x10); 
  LCD_Write_DATA(0x10,0x90); // 1490//SAP, BT[3:0], AP, DSTB, SLP, STB
  LCD_Write_COM(0x00,0x11); 
  LCD_Write_DATA(0x02,0x27); // DC1[2:0], DC0[2:0], VC[2:0]
  delay(50); // Delay 50ms
  LCD_Write_COM(0x00,0x12); 
  LCD_Write_DATA(0x00,0x1F); //001C// Internal reference voltage= Vci;
  delay(50); // Delay 50ms
  LCD_Write_COM(0x00,0x13); 
  LCD_Write_DATA(0x15,0x00); //0x1000//1400   Set VDV[4:0] for VCOM amplitude  1A00
  LCD_Write_COM(0x00,0x29); 
  LCD_Write_DATA(0x00,0x27); //0x0012 //001a  Set VCM[5:0] for VCOMH  //0x0025  0034
  LCD_Write_COM(0x00,0x2B); 
  LCD_Write_DATA(0x00,0x0D); // Set Frame Rate   000C
  delay(50); // Delay 50ms
  LCD_Write_COM(0x00,0x20); 
  LCD_Write_DATA(0x00,0x00); // GRAM horizontal Address
  LCD_Write_COM(0x00,0x21); 
  LCD_Write_DATA(0x00,0x00); // GRAM Vertical Address
  // ----------- Adjust the Gamma Curve ----------//
  LCD_Write_COM(0x00,0x30); 
  LCD_Write_DATA(0x00,0x00);
  LCD_Write_COM(0x00,0x31); 
  LCD_Write_DATA(0x07,0x07);
  LCD_Write_COM(0x00,0x32); 
  LCD_Write_DATA(0x03,0x07);
  LCD_Write_COM(0x00,0x35); 
  LCD_Write_DATA(0x02,0x00);
  LCD_Write_COM(0x00,0x36); 
  LCD_Write_DATA(0x00,0x08);//0207
  LCD_Write_COM(0x00,0x37); 
  LCD_Write_DATA(0x00,0x04);//0306
  LCD_Write_COM(0x00,0x38); 
  LCD_Write_DATA(0x00,0x00);//0102
  LCD_Write_COM(0x00,0x39); 
  LCD_Write_DATA(0x07,0x07);//0707
  LCD_Write_COM(0x00,0x3C); 
  LCD_Write_DATA(0x00,0x02);//0702
  LCD_Write_COM(0x00,0x3D); 
  LCD_Write_DATA(0x1D,0x04);//1604
 
    //------------------ Set GRAM area ---------------//
  LCD_Write_COM(0x00,0x50); 
  LCD_Write_DATA(0x00,0x00); // Horizontal GRAM Start Address
  LCD_Write_COM(0x00,0x51); 
  LCD_Write_DATA(0x00,0xEF); // Horizontal GRAM End Address
  LCD_Write_COM(0x00,0x52); 
  LCD_Write_DATA(0x00,0x00); // Vertical GRAM Start Address
  LCD_Write_COM(0x00,0x53); 
  LCD_Write_DATA(0x01,0x3F); // Vertical GRAM Start Address
  LCD_Write_COM(0x00,0x60); 
  LCD_Write_DATA(0xA7,0x00); // Gate Scan Line
  LCD_Write_COM(0x00,0x61); 
  LCD_Write_DATA(0x00,0x01); // NDL,VLE, REV
  LCD_Write_COM(0x00,0x6A); 
  LCD_Write_DATA(0x00,0x00); // set scrolling line
  //-------------- Partial Display Control ---------//
  LCD_Write_COM(0x00,0x80); 
  LCD_Write_DATA(0x00,0x00);
  LCD_Write_COM(0x00,0x81); 
  LCD_Write_DATA(0x00,0x00);
  LCD_Write_COM(0x00,0x82); 
  LCD_Write_DATA(0x00,0x00);
  LCD_Write_COM(0x00,0x83); 
  LCD_Write_DATA(0x00,0x00);
  LCD_Write_COM(0x00,0x84); 
  LCD_Write_DATA(0x00,0x00);
  LCD_Write_COM(0x00,0x85); 
  LCD_Write_DATA(0x00,0x00);
  //-------------- Panel Control -------------------//
  LCD_Write_COM(0x00,0x90); 
  LCD_Write_DATA(0x00,0x10);
  LCD_Write_COM(0x00,0x92); 
  LCD_Write_DATA(0x06,0x00);
  LCD_Write_COM(0x00,0x07); 
  LCD_Write_DATA(0x01,0x33); // 262K color and display ON
  digitalWrite(LCD_CS,HIGH);  
 
}
 
void Pant(char VH,char VL)
{
  int i,j;
  digitalWrite(LCD_CS,LOW); 
  Address_set(0,0,240,320);
  for(i=0;i&lt;320;i++)
  {
    for (j=0;j&lt;240;j++)
    {
      LCD_Write_DATA(VH,VL);
    }
 
  }
  digitalWrite(LCD_CS,HIGH);  
}
 
void setup()
{
  unsigned char p;
  char hi,lo;
  int i,j,k;
  for(p=0;p&lt;20;p++)
  {
    pinMode(p,OUTPUT);
  }
 
  LCD_Init();          
  // Pant(0xff,0xff);           						
 
  digitalWrite(LCD_CS,LOW);  
  for(k=0;k&lt;8;k++)     
  {
    for(j=0;j&lt;6;j++)
    {	
      Address_set(40*j,40*k,40*j+39,40*k+39);
      for(i=0;i&lt;1600;i++)
      {
        hi=pgm_read_byte(&image[i*2+1]);
        lo=pgm_read_byte(&image[i*2]);
        LCD_Write_DATA(hi,lo);
 
      }
    }
  }
  digitalWrite(LCD_CS,HIGH); 
}
 
void loop()
{
 
}
</avr>

Continue reading

nRF24L01 Wireless Module with Arduino

Now we have a demo show how to use the Arduino controlling the nRF24L01 module , and you need two Arduino boards and two modules, one to transmit and the other receive. The connection of two part is the same but the different software.

The nRF24L01 module is worked at 3V voltage level , so the Arduino 5V pins may destroy it , so we need to add some resister to protect the module – using the 10K and the 15K resister to reduce the voltage is a usual method.

Connect the module pins to Arduino as below:
CS – D8 , CSN – D9 , SCK – D10 , MOSI – D11 , MISO – D12 , IRQ – D13
 

Continue reading

ITDB02-2.4 display with Arduino

Now we will show how to use the Arduino (ATMega 168) to control the TFT LCD module ITDB02.

To have a quicker refresh rate , we use the 16bit mode for LCD, it’s two times faster than 8 bit mode.

Connect the pins to Arduino first :
DB0-DB16 to pin D0-D13 , pin A0-A1 of Arduino
RESET to A2
CS to A3
WR to A4
RS to A5

All the data pins of Arduino is used ….So , we just can connect the RD to 3.3V ….We don’t used it because we don’t need to read back the data from the screen.

Connect the power pins : LCD-A to 3.3V , VCC to 5V , GND to GND

Continue reading