Pages

Thursday, 20 November 2014

Bluetooth Module HC-06


Bluetooth Module HC-06:

This module enables you to wireless transmit & receive serial data. It is a drop in replacement for wired serial connections allowing transparent two way data communication. You can simply use it for serial port replacement to establish connection between MCU or embedded project and PC for data transfer. This board operates on 5V and has LED indication and 3V regulator.







Bluetooth Interface Arm code: 


/*
 * Project name:
     BLUETOOTH MODULE
 * Copyright
     (c) Researchdesignlab.com
 * Description:
    
 * Test configuration:
     MCU:             LPC2129
     Dev.Board:       LPC2129 mini
     Oscillator:      12 MHz
     Software:        Keil uVision3

*/


#include<stdio.h>
#include"lpc21xx.h"    // header file
#include<string.h>
//*******************************************************************
void SEND_CMD_2_LCD(unsigned char);    // function protoype
void SEND_2_LCD(unsigned char *, unsigned char);
void DISPLAY_ON_LCD(unsigned char DATA);
unsigned char RECIVE_DATA(void);
void TRANSMIT_UART0_BYTE(unsigned char P);
void TRANSMIT_UART0(unsigned char *P);


#define sw4 0x00010000 

void DELAY(void); 
void LCD_DELAY(void);


unsigned int LCD_RS=0X01000000;      // pin declerations
unsigned int LCD_EN=0X02000000;
unsigned int LCD_DATA_LINES=0X00003C00;
unsigned char RX;
                        

//*******************************************************************
int main()
{
    unsigned char LCD_CMD[]={0X20,0X28,0X0f,0X06,0X01,0X80},COUNT,i; // LCD commands


    IODIR0|=LCD_DATA_LINES;
    IODIR1=0X03300000;
      
    for(COUNT=0;COUNT<6;COUNT++)
    SEND_CMD_2_LCD(LCD_CMD[COUNT]); // LCD INIT function call

    PINSEL0    = 0X00050000;
    PINSEL1=0X15400000;       // UART INIT
    U1LCR = 0X83;           // 8bit data setting        
    U1DLL = 0X61;                                   
    U1LCR = 0X03;    // 9600 baud rate setting        
    U1FCR = 0X01;    // FIFO enable

    PINSEL0|=0X00000005;
    U0LCR=0X83;
    U0DLL=0X61;
    U0DLM=0X00;
    U0LCR=0X03;

      DELAY();

      DELAY();
      DELAY();
      
                 
  TRANSMIT_UART0("MC 1");              //TRANSMIT DATA TO BLUE TOOTH
  while(1)
   {
  
   
   RX=RECIVE_DATA();            // RECEIVING BLUE TOOTH DATA DISPLAY ON LCD
   DISPLAY_ON_LCD(RX);
   i++;
  

  }
 }



    void DELAY(void)
    {
    unsigned int X=800000;
    while(X--);
    }
    
    
    void LCD_DELAY(void)
    {
    unsigned int X=20000;  // delay calculation subroutine
    while(X--);
    } 

 void SEND_CMD_2_LCD(unsigned char DATA)
{
    unsigned int TEMP;                      // LCD command write function
    IOCLR0=LCD_DATA_LINES;
    TEMP=DATA;
    TEMP=((TEMP&0xf0)<<6);
    IOCLR1=LCD_RS;
    IOSET0=TEMP;
    IOSET1=LCD_EN;
    LCD_DELAY();
    LCD_DELAY();
    IOCLR1=LCD_EN;
    IOCLR0=LCD_DATA_LINES;
    
    LCD_DELAY();

    TEMP=DATA;
    TEMP=((TEMP&0x0f)<<10);
    IOCLR1=LCD_RS;
    IOSET0=TEMP;
    IOSET1=LCD_EN;
    LCD_DELAY();
    LCD_DELAY();
    IOCLR1=LCD_EN;
    IOCLR0=LCD_DATA_LINES;
}

void DISPLAY_ON_LCD(unsigned char DATA)
{
    unsigned int TEMP;
    IOCLR0=LCD_DATA_LINES;
    TEMP=DATA;                          //LCD data write function
    TEMP=((TEMP&0xf0)<<6);
    IOSET1=LCD_RS;
    IOSET0=TEMP;
    IOSET1=LCD_EN;
    LCD_DELAY();
    LCD_DELAY();
    IOCLR1=LCD_EN;
    IOCLR0=LCD_DATA_LINES;
    
    LCD_DELAY();

    TEMP=DATA;
    TEMP=((TEMP&0x0f)<<10);
    IOSET1=LCD_RS;
    IOSET0=TEMP;
    IOSET1=LCD_EN;
    LCD_DELAY();
    LCD_DELAY();
    IOCLR1=LCD_EN;
    IOCLR0=LCD_DATA_LINES;
}


void SEND_2_LCD(unsigned char *PTR, unsigned char POS)
{
    SEND_CMD_2_LCD(POS);
    while(*PTR)
    {                               // sending the data to LCD data line function
        DISPLAY_ON_LCD(*PTR);
        PTR++;
    }
    LCD_DELAY();
    LCD_DELAY();
}


void TRANSMIT_UART0(unsigned char *P)
   {
    while(*P){
        U0THR=*P;
        while(!(U0LSR&0X20));
        P++;}
    }

        
void TRANSMIT_UART0_BYTE(unsigned char P)
   {

        U0THR=P;
        while(!(U0LSR&0X20));
    
    }

    
  unsigned char RECIVE_DATA(void)
   { 
        while(!(U0LSR&0X01));
        RX=U0RBR;
        return(RX);
   }


Bluetooth Interface atmel schematic:




Bluetooth Interface Atmel Code:


/*
 * Project name:
    BLUETOOTH MODULE
 * Copyright
     (c) Researchdesignlab.com
 * Description:
    
 * Test configuration:
     MCU:             AT89S52
     Dev.Board:       8051
     Oscillator:      11.0592 MHz
     Software:        Keil uVision3

*/


#include<reg51.h>  

#define LCD_PORT P2                    // LCD D0-D7 PINS connected P2
sbit rs=P3^5;                        // LCD RS PIN connected P3.5
sbit en=P3^7;                        // LCD EN PIN connected P3.7
sbit D7=P2^7;
sbit rw=P3^6;                         // LCD RW PIN connected P3.6


void busy();                          //LCD busy 
void CMD_WRT(unsigned char);           //To write the commands to the LCD
void DATA_WRT(unsigned char);         //To write the data to the LCD
void LCD_WRT(unsigned char *); 
void DELAY();
void TRANSMIT(unsigned char *);
void transmit_byte(unsigned char );
unsigned char SCI_ReceiveByte( void );


 void main()
  {
   unsigned char CMD[]={0x38,0x01,0x0f,0x06,0x80},TEMP1,i,RX;

    for(i=0;i<5;i++)
    {
    TEMP1=CMD[i];                         //write the commands to the LCD
    CMD_WRT(TEMP1);
    }

    TMOD=0X20;                              //TIMER 1 , MODE 2
    TH1=0XFD;                              //9600 BAURD RATE            //SERAIL INIT
       SCON=0X50;
    TR1=1;                                  //TIMER1 ON
    DELAY();
    DELAY();
    DELAY();                               //DELAY
    DELAY();

     TRANSMIT("MC 1 ");          // trasmit the data to BLUETOOTH
  while(1)
  {
  
  
   RX=SCI_ReceiveByte();                      // RECIVING DATA from BLUETOOTH AND DISPLAY ON LCD
   DATA_WRT(RX);
      
  }
 }
    
    void DELAY()
    {                                  //delay of 3ms 
    unsigned int X=800000;
    while(X--);
    }
    
    
    void busy()
    {
    D7=1;
    rs=0;                             //cmd mode
    rw=1;                             //read
    while(D7!=0)                    //wait till LCD is ready
    {
    en=0;
    en=1;                            // low to high latch 
    }
    } 
    
    
    
    void CMD_WRT(unsigned char val)
    {
    busy();
    LCD_PORT=val;                   //write cmd to P2
    rs=0;                           //cmd mode
    rw=0;                           //write
    en=1;
    en=0;                           //high to low latch 
    }
    
    
    void DATA_WRT(unsigned char ch)
    {
    busy();
    LCD_PORT = ch;                  //write cmd to P2
    rs=1;                          //data mode
    rw=0;                          //write
    en=1;
    en=0;                          //high to low latch 
    }
    

    void transmit_byte(unsigned char  byte)       // TRANSIMITT SERIAL DATA
    {
    SBUF=byte;                                  //TRANSMIT DATA FROM  BYTE TO SBUF 
    while(!TI);                                   // WAIT TILL DTA GET TRANSMITTED 
    TI=0;
    }
    
    void TRANSMIT(unsigned char *string)
    {
    while(*string)
    transmit_byte(*string++);
    }
          
    unsigned char SCI_ReceiveByte( void )
    {                                            // RECIVING SERIAL DATA
    unsigned char byte;
    //    RI=0;
    while(RI!=1);                                // WAIT TILL RI IS HIGH
    byte = SBUF;                                //RECIVE DATA FROM SBUF TO BYTE
    RI=0;
    return byte;                                 // RETURN THE DATA
    }

Bluetooth Interface PIC Schematic:



Bluetooth Interface PIC Code:

/*
 * Project name:
    BLUETOOTH MODULE
 * Copyright
     (c) Researchdesignlab.com
 * Test configuration:
     MCU:             PIC16F877A
     Dev.Board:       PIC
     Oscillator:      20.0 MHz
     Software:  mikroC PRO for PIC v 4.6

*/



// LCD module connections
sbit LCD_RS at RB4_bit;
sbit LCD_EN at RB5_bit;
sbit LCD_D4 at RB0_bit;
sbit LCD_D5 at RB1_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D7 at RB3_bit;

sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;
// End LCD module connections

unsigned char uart_rd,i;

void main() {


  Lcd_Init();                        // Initialize LCD

  Lcd_Cmd(_LCD_CLEAR);               // Clear display
  Lcd_Cmd(_LCD_CURSOR_OFF);          // Cursor off

  UART1_Init(9600);               // Initialize UART module at 9600 bps
  Delay_ms(100);                  // Wait for UART module to stabilize

   UART1_Write_Text("MC 1");       // TRANSMIT "MC 1" TO   bluetooth

  
  while(1)
  {

   if (UART1_Data_Ready()) {     // If data is received,
      uart_rd = UART1_Read();     // read the received data FROM   bluetooth
      Lcd_Chr_Cp(uart_rd);       // and send data lcd
      i++;
      }

    /*
   
    
     */
    
  }
  
 }



Bluetooth module Features:

  • 5V power operation.
  • Supports baud rates from 1200 to 1382400 bps (default is 9600 bps)
  • UART interface
  • TTL output.
  • Built in antenna
  • 10 meters range
  • Easy to use
  • Minimum External Components
  •  Status LEDs
  • High quality PCB FR4 Grade with FPT Certified.

For Sample Codes , Schematics : CLICK HERE




Friday, 14 November 2014

ISP ATMEGA Programmer



ISP ATMEGA Programmer:


This programmer is based on USBasp design and connects to your computer's USB port. Not only is it quite compact, but the design is really elegent. The USB interface is achieved by using an atmega processor and the rest is done in firmware. ISP programmer supports  Atmel and Atmega microcontrollers. It is a reliable tool for fast programming of Atmel and Atmega devices.


ISP ATMEGA Programmer Features:


  • No special controllers or smd components are needed.
  • Programming speed is up to 5kBytes/sec.
  • SCK option to support targets with low clock speed (< 1,5MHz).
  • AVR Series: ATTiny12 (L), ATTiny13 (V), ATTiny15 (L), ATTiny24 (V), ATTiny25 (V), ATTiny26 (L), ATTiny2313 (V) , ATTiny44 (V), ATTiny45 (V), ATTiny84 (V), ATTiny85 (V), AT90S2313 (L), AT90S2323 (L), AT90S2343 (L), AT90S1200 (L), AT90S8515 (L), AT90S8535 (L), ATMEGA48 (V), ATMEGA8 (L), ATMEGA88 (V), ATMEGA8515 (L), ATMEGA8535 (L), ATMEGA16 (L), ATMEGA162 (V), ATMEGA163 (L), ATMEGA164 (V), ATMEGA165 (V), ATMEGA168 (V), ATMEGA169 (V), ATMEGA169P (V), ATMEGA32 (L), ATMEGA324 (V), ATMEGA325 (V), ATMEGA3250 (V), ATMEGA329 (V), ATMEGA3290 (V), ATMEGA64 (L), ATMEGA640 (V), ATMEGA644 (V), ATMEGA645 (V), ATMEGA6450 (V), ATMEGA649 (V), ATMEGA6490 (V), ATMEGA128 (L), ATMEGA1280 (V), ATMEGA1281 (V), ATMEGA2560 (V), ATMEGA2561 (V) etc
    High quality PCB FR4 Grade with FPT Certified.

For Sample Codes , Schematics : CLICK HERE


RF TX RX with 8 Bit Encoder and Decoder


RF TX RX with 8 Bit Encoder and Decoder


The TX is an ASK transmitter module.The TX isdesigned specifically for remote-control , wireless mouseand car alarm system operating at 315/433.92 MHz.The RX is a miniature receiver module that receives On-offkeyed ( OOK )modulation signal and demodulated to digital signal for the next decoder stage.The RX is designed specifically for remote-control and wireless security receiver operating at 315/434Mhz. UART TTL o/p - Baud Rate - 9600.



RF TX RX with 8 Bit Encoder and Decoder Features:

  • Input Power supply - 5 Volts
  • Compatible for Both RF 433/ 315 Mhz
  • Interface upto 8 Bit Data.
  • UART TTL o/p - Baud Rate - 9600
  • Package Includes with RF Tx Rx.
  • Indicating LED's.
  • High quality PCB FR4 Grade with FPT Certified.

For Codes , Schematics : CLICK HERE

Wednesday, 12 November 2014

CC2500 RF Transceiver


CC2500 RF Transceiver

CC2500 RF Module is a transreceiver module which provides easy to use RF communication at 2.4 Ghz. It can be used to transmit and receive data at 9600 baud rates from any standard CMOS/TTL source. This module is a direct line in replacement for your serial communication it requires no extra hardware and no extra coding toIt works in Half Duplex mode i.e. it provides communication in both directions, but only one direction at same time.


CC2500 RF Transceiver Features:

  • Input Voltage - 5Volts DC
  • Serial Data Rate - 9600bps,
  • Available frequency at : 2.4-2.483 GHz
  • No external Antenna required.
  • Low current consumption. (RX:13.3mA,TX:21.2mA @0dBm output power)
  • Easy for application.
  • Efficient SPI interface
  • Operating temperature range: -40 85
  • Operating voltage:1.8~ 3.6 Volts.
  • Programmable output power (up to 1dBm).
  • Hi sensitivity (-101dBm @10kbps)
  • High quality PCB FR4 Grade with FPT Certified.
For Codes , Schematics : CLICK HERE

Tuesday, 11 November 2014

Mega 2560 R3 ATmega2560-16AU Board+Free USB Cable For Arduino


QUICK OVERVIEW :

Alternative ATMEGA16U2 chip 2011 version of ATMEGA8U2 , ISP FLASH increased capacity doubled, to facilitate greater functionality extensions, developers need. ATMEGA16U2 addition to traditional USB to serial, also allows user programming to define other functions, such as the USB port can be configured as a mouse, keyboard, game joystick, camera, of course, these applications have yet to be Arduino team to disclose the specific embodiments.External interface increase on the basis of the 2011 version of the SDA, SCL (the left side of the position in the AREF).IOREF interface can be provided to the Shield a voltage reference. And compatibility considerations for future products the IOREF reserve a port on the left side.RESET circuit than the 2011 version. Prevent RESET the accidental reset the the RESET circuit more stable.






FOR MORE SAMPLE CODES & SCHEMATICS : CLICK HERE

Tuesday, 4 November 2014

GSM/GPRS Shield


Quick Overview

This is a very low cost and simple Arduino GSM and GPRS shield. We use the module SIMCom SIM900A.
The Shield connects your Arduino to the internet using the GPRS wireless network. Just plug this module onto your Arduino board, plug in a SIM card from an operator offering GPRS coverage and follow a few simple instructions to start controlling your world through the internet. You can also make/receive voice calls (you will need an external speaker and microphone circuit) and send/receive SMS messages.




GSM/GPRS Shield Features:


  • Dual-Band GSM/GPRS 900/ 1800 MHz
  • TTL data(RX,TX,GND).
  • ESD Compliance.
  • Enable with MIC and SPeaker socket.
  • SMA connector with GSM Antenna 
  • SIM Card holder.
  • Configurable baud rate
  • Inbuilt Powerful TCP/IP protocol stack for internet data transfer over GPRS.

GSM/GPRS Shield Applications:

  • Industrial automation.
  • GPRS based data logging.
  • GPRS and GPS application.
  • Home automation.
  • Health monitoring. 
  • Agriculture automation.
  • Vehicle tracking.
  • Remote monitoring and controlling.
  • GPRS based Weather report logging. 
  • GSM GPRS based Security alert. 
  • GPRS based remote terminal for file transfer.
  • IVRS.
  • Bulksms sending.


GSM/GPRS Shield SAMPLE CODE:

void setup()
{
Serial.begin(9600);
delay(5000);

}
void loop()
{
Serial.println("AT");
delay(1000);
Serial.println("AT+CMGF=1");
delay(1000);
Serial.println("AT+CMGS=\"1234567890\""); //CHANGE TO DESTINATION NUMBER (10 digit)
delay(1000);
Serial.print("hi");
Serial.write(26);
delay(1000);
}

For Schematics , Tutorials : http://researchdesignlab.com/modules/gsm-gprs-shield.html

Monday, 3 November 2014

dsPIC Development Board



dsPIC Development Board

PICs are popular with both industrial developers and hobbyists alike due to their low cost, wide availability, large user base, extensive collection of application notes, availability of low cost or free development tools, and serial programming (and re-programming with flash memory) capability. They are also commonly used in educational programming.
dsPIC Development  Board provides the best solution for fast and simple development of 40-pin dsPIC30F microcontroller applications.It includes connectors for connecting the dsPICprog in-system stand-alone programmer. These connectors enable you to program microcontrollers without any other additional devices







dsPIC Development Board Features:


  • High quality dsPIC microcontroller development board.
  • A USB supported prototype board for 40-pin dsPIC30F MCUs.
  • The MAX232 chip RS232 communication.
  • On-board USB to serial UART interface FT232R that can be easily connected to a PC.
  • All IO ports pin have extraction and clearly marked.
  • On Board Power supply 3.3V,5V,GND.
  • On board ISP Programmer.
  • Quartz crystal 20 MHz.
  • Reset button.
  • Power plug-in DC Socket.
  • Power supply indicator LED.
  • Test led for Tx, Rx.
  • Pin outs for 5V,3.3V,GND.
  • All IO’s are connected by brug stripps for easy connection
FOR MORE SAMPLE CODES , SCHEMATICS & TUTORIALS : CLICK HERE