Вы находитесь на странице: 1из 5

How to know the Bluetooth version of a HC-05 ...

http://www.ablab.in/how-to-know-the-bluetooth-...

Careers

0 items in cart Rs.0.00

Contact Us

Welcome visitor you can Login or create an account

Summer Training Program 2016 on Robotics, Embedded System, Arduino and others starting are from 1st May.

Hurry Up !!!

Book Your Seat Now.

Limited Seats Only.

Click Here to Know More

Home

Electroshop

Knowledge Centre

Educational Workshops

Training Programs

More

ABLab Solutions > Knowledge Centre > Sample Codes > Microcontrollers > ATmega32 > Getting the Version of HC-05 Bluetooth Module with ATmega32

Getting the Version of HC-05 Bluetooth Module with ATmega32

Knoweldge Centre
Sample Codes

In this project, we will learn How to know the Bluetooth version of a HC-05 Bluetooth Module with AVR ATmega32

Softwares

microcontroller. Here, we will read the Bluetooth version of the HC-05 Bluetooth Module and we will display the
Bluetooth version of the HC-05 Bluetooth Module in a 16X2 alphanumeric LCD.
The communication between HC-05 Bluetooth Module and ATmega32 microcontroller takes place through UART
serial communication protocol. To read the version of the HC-05 Bluetooth Module, the ATmega32 microcontroller
will send the AT command AT+VERSION? to the HC-05 Bluetooth Module. In return, the HC-05 Bluetooth module
will send a response to ATmega32 microcontroller. If the AT command is executed successfully, the HC-05
Bluetooth Module will send the Bluetooth version of the HC-05 Bluetooth Module to ATmega32 microcontroller. The
ATmega32 microcontroller will also display the Bluetooth version of the HC-05 Bluetooth Module in a 16X2
alphanumeric LCD.

Hardwares Required
AVR Trainer Board-100-1pc
AVR USB Programmer-1pc
12V, 1A DC Adapter-1pc
16X2 Alphanumeric LCD(JHD162A)-1pc
HC-05 Bluetooth Module-1pc
1 to 1 Connector-7pcs
10 to 10 FRC Female Connector-2pcs
USB AM-AF Cable(Optional)-1pc

Softwares Required

Most Popular Posts


Line Follower Robot with
ATmega16 using Analog IR
Sensor
15,533 views

16X2 Alphanumeric LCD


Interfacing with ATmega16
9,618 views

LED Blinking with ATmega16


9,502 views

L293D based DC Motor Driver


Interfacing with ATmega16 in
5V Mode
7,129 views

Accelerometer based Hand


Gesture Controlled Robot
with ATmega32
6,327 views

PC to ATmega16
Communication with LED
Display
6,242 views

Atmel Studio 6

SinaProg Hex Downloader


Software

SinaProg Hex Downloader

5,552 views

USBasp Driver

Circuit Diagram

Obstacle Avoider Robot with


ATmega16 using Analog IR
Sensor
5,508 views

4X4 Keypad Interfacing with


ATmega16 and LCD Display
5,391 views

Accelerometer based Hand


Gesture Controlled Robot
with ATmega16
5,057 views

16X2 Alphanumeric LCD


Interfacing with ATmega32
4,918 views

EM-18 RFID Reader


Interfacing with ATmega16
4,550 views

1 de 5

07-04-2016 12:09

How to know the Bluetooth version of a HC-05 ...

http://www.ablab.in/how-to-know-the-bluetooth-...

L293D based DC Motor Driver


Interfacing with ATmega16 in
PWM Mode
4,356 views

C Program

Analog IR Sensor Interfacing


with ATmega16 and LED
Display

//**************************************************************//

4,134 views

:8MHz

//Software

:Atmel Studio 6

//LCD Data Interfacing

:8-Bit

//USART Baud Rate

:9600

3,963 views

//USART Data Bits

:8

//USART Stop Bits

:1

//USART Mode

:Asynchronous Mode

L293D based DC Motor Driver


Interfacing with ATmega32 in
PWM Mode

//USART Parity

:No Parity

LM35 Temperature Sensor


Interfacing with ATmega32
and LCD Display

3,701 views

HC-06 Bluetooth Module


Interfacing with ATmega32

//**************************************************************//

3,438 views

#include<avr/io.h>

EM-18 RFID Reader


Interfacing with ATmega32

/*Includes io.h header le where all the Input/Output Registers and its Bits are dened for all AVR
microcontrollers*/
#dene

F_CPU

3,214 views

Line Follower Robot with


ATmega32 using Analog IR
Sensor

8000000

/*Denes a macro for the delay.h header le. F_CPU is the microcontroller frequency value for the delay.h header

3,102 views

le. Default value of F_CPU in delay.h header le is 1000000(1MHz)*/

DTMF based
Mobile/Cellphone Controlled
Robot with ATmega16

#include<util/delay.h>
/*Includes delay.h header le which denes two functions, _delay_ms (millisecond delay) and _delay_us

2,975 views

(microsecond delay)*/
#dene

LCD_DATA_PORT

LM35 Temperature Sensor


Interfacing with ATmega16
and 7 Segment Display

PORTB

/*Denes a macro for the lcd.h header File. LCD_DATA_PORT is the microcontroller PORT Register to which the data

2,898 views

pins of the LCD are connected. Default PORT Register for data pins in lcd.h header le is PORTA*/
#dene

LCD_CONT_PORT

LED Interfacing with


ATmega16

PORTC

2,893 views

/*Denes a macro for the lcd.h header File. LCD_CONT_PORT is the microcontroller PORT Register to which the

PC to ATmega32
Communication with LCD
Display

control pins of the LCD are connected. Default PORT Register for control pins in lcd.h header le is PORTB*/
#dene

LCD_RS

2,690 views

PC0

DS1307 RTC Interfacing with


ATmega16 and LCD Display

/*Denes a macro for the lcd.h header le. LCD_RS is the microcontroller Port pin to which the RS pin of the LCD is
connected. Default Port pin for RS pin in lcd.h header le is PB0*/
#dene

LCD_RW

Tech Ambassador Program

//System Clock

2,625 views

DS1307 RTC based Digital


Clock Designing in 24 Hour
Format with ATmega32 and
7-Segment Display

PC1

/*Denes a macro for the lcd.h header le. LCD_RW is the microcontroller Port pin to which the RW pin of the LCD is
connected. Default Port pin for RW pin in lcd.h header le is PB1*/
2,567 views

#dene

LCD_EN

PC2

/*Denes a macro for the lcd.h header le. LCD_EN is the microcontroller Port pin to which the EN pin of the LCD is
connected. Default Port pin for EN pin in lcd.h header le is PB2*/
#include<avr/lcd.h>
/*Includes lcd.h header le which denes dierent functions for all Alphanumeric LCD(8-Bit Interfacing Method).
LCD header le version is 1.1*/
#include<avr/hc05.h>
/*Includes hc05.h header le which denes dierent functions for HC-05 Bluetooth Module. HC-05 header le
version is 1.1*/
extern char hc_05_buer2[];
/*Variable is declared in hc05.h header le*/

2 de 5

Horizontal Scrolling in 16X2


Alphanumeric LCD with
ATmega16
2,533 views

3-axis Accelerometer SensorADXL335 Interfacing with


ATmega16
2,406 views

7-Segment Display Interfacing


with ATmega16
2,352 views

20X4 Alphanumeric LCD


Interfacing with ATmega16
2,299 views

Relay Interfacing with

07-04-2016 12:09

How to know the Bluetooth version of a HC-05 ...

http://www.ablab.in/how-to-know-the-bluetooth-...

ATmega16

int main(void)

2,223 views

HC-06 Bluetooth Module


Interfacing with ATmega16

DDRB=0x;

2,178 views

/*All the 8 pins of PortB are declared output (data pins of LCD are connected)*/

PC Controlled Robot with


ATmega16

DDRC=0x07;

2,122 views

/*PC0, PC1 and PC2 pins of PortC are declared output (control pins of LCD are connected)*/

1,987 views

/*Variable declaration*/

Tech Ambassador Program

128X64 Graphical LCD


Interfacing with ATmega16

unsigned char received_data;

4X4 Keypad Interfacing with


ATmega32 and LCD Display

lcd_init();

1,971 views

/*LCD initialization*/

Character Display in 128X64


Graphical LCD with
ATmega32

usart_init();
/*USART initialization*/

1,966 views

Analog to Digital Converter of


ATmega16 with LED Display

lcd_string_write(ABLab Solutions);
/*String is displayed in 1st row of LCD*/

1,942 views

00 to 99 Display in Quad
7-Segment Display with
ATmega32

lcd_command_write(0xc0);
/*Cursor moves to 2nd row 1st column*/

1,929 views

lcd_string_write(www.ablab.in);

00 to 99 Display in Quad
7-Segment Display with
ATmega16

/*String is displayed in 2nd row of LCD*/


_delay_ms(500);

1,864 views

_delay_ms(500);

Analog Light Sensor


Interfacing with ATmega16
and LCD Display

_delay_ms(500);
_delay_ms(500);

1,830 views

LED Dancing with ATmega16

do

1,829 views

{
received_data=hc_05_bluetooth_at_command_mode_test();
_delay_ms(100);

Products on Sale
Sale!

}while(!received_data);
/*Waiting for the Bluetooth Module to enter into Command Mode*/
lcd_command_write(0x01);
/*Clear Screen*/
lcd_string_write(Now in AT Mode);
/*String is displayed in 1st row of LCD*/
_delay_ms(500);
_delay_ms(500);
received_data=hc_05_bluetooth_get_version();
/*Sending AT Command to know the Bluetooth Modules version*/
/*Checking whether Bluetooth Modules version is read or not*/
if(received_data==1)
{
lcd_command_write(0x01);
/*Clear Screen*/

AVR Trainer Board and Programmer


Combo
Rs.1,000.00

Add to cart

Sale!

lcd_string_write(BluetoothVersion);

3 de 5

07-04-2016 12:09

How to know the Bluetooth version of a HC-05 ...

http://www.ablab.in/how-to-know-the-bluetooth-...

/*String is displayed in 1st row of LCD*/


lcd_command_write(0xc0);
/*Cursor moves to 2nd row 1st column*/
lcd_string_write(hc_05_buer2);
/*String is displayed in 2nd row of LCD*/
}
{

Tech Ambassador Program

AVR Trainer Board-100

else

Rs.700.00

Add to cart

/*Null statement*/
}

Sale!

}
/*End of program*/

Connection Guide
The step-by-step connection guide for Getting the Version of HC-05 Bluetooth Module with ATmega32 project is as
follows:
Insert the DC Pin of 12V, 1A DC Adapter to the DC Socket of AVR Trainer Board-100.
Connect PortB header with LCD data header in AVR Trainer Board-100 with a 10 to 10 FRC Female Connector.
Connect RS, RW & EN pins of LCD control header with PC0, PC1 & PC2 pins of PortC header respectively in AVR
Trainer Board-100 with 1 to 1 Connectors.
Connect the 16X2 Alphanumeric LCD to the LCD header of AVR Trainer Board-100.
Connect the VCC and GND pins of HC-05 Bluetooth Module with the 5V(VCC) and GND header pins of AVR Trainer
Board-100 respectively with 1 to 1 Connectors.
Connect the TXD and RXD pins of HC-05 Bluetooth Module with PD0 and PD1 pins of PortD header of AVR

AVR USB Programmer


Rs.300.00

Add to cart

Trainer Board-100 respectively with 1 to 1 Connectors.


Connect the ISP header of AVR Trainer Board-100 with AVR USB Programmer header of AVR USB Programmer
with a 10 to 10 FRC Female Connector.
Connect the AVR USB Programmer to the PC/Laptops USB Port directly or with the help of USB AM-FM Cable.
Download the Getting the Version of HC-05 Bluetooth Module with ATmega32 Hex le to AVR Trainer Board-100
with the help of SinaProg Hex downloader and AVR USB Programmer.
Press the Push Button Switch in HC-05 Bluetooth Module and Switch on the power with the help of Power Switch

Find us on Facebook
ABLab Solutions
5,049 likes

of AVR Trainer Board-100 and release the Push Button Switch of HC-05 Bluetooth Module after 2-3 seconds of
Like Page

power on.
See the output in the 16X2 Alphanumeric LCD.

Book Now

Be the first of your friends to like this

Download Materials
Getting the Version of HC-05 Bluetooth Module with ATmega32 Code V 1.1

13 downloads

38.70 KB

Download (http://www.ablab.in/?wpdmdl=16279)

HC-05 Header File v1.1

506 downloads

2.34 KB

Share to Download Code and Header Files


Download (http://www.ablab.in/?wpdmdl=17451)

Getting the Version of HC-05 Bluetooth Module with ATmega32

USART Header File v1.1

2381 downloads

1.91 KB

Share

Download (http://www.ablab.in/?wpdmdl=6660)

Alphanumeric LCD Header File v1.1

5865 downloads

1.14 KB

Download (http://www.ablab.in/?wpdmdl=6665)

4 de 5

07-04-2016 12:09

How to know the Bluetooth version of a HC-05 ...

http://www.ablab.in/how-to-know-the-bluetooth-...

Related Posts
1. Getting the Version of HC-06 Bluetooth Module with ATmega32
2. Getting the Version of HC-05 Bluetooth Module with ATmega16
3. Getting the Version of HC-06 Bluetooth Module with ATmega16
4. HC-05 Bluetooth Module Interfacing with ATmega32
5. Changing Pin of HC-05 Bluetooth Module with ATmega32
6. Changing Pin of HC-06 Bluetooth Module with ATmega32
8. HC-05 Bluetooth Module Interfacing with Android Mobile using ATmega32
9. HC-05 Bluetooth Module AT Command Mode Testing with ATmega32
10. HC-06 Bluetooth Module AT Command Mode Testing with ATmega32
11. HC-06 Bluetooth Module Interfacing with Android Mobile using ATmega32
12. Changing Baud Rate of HC-05 Bluetooth Module with ATmega32
13. Changing Baud Rate of HC-06 Bluetooth Module with ATmega32
14. HC-06 Bluetooth Module to Android Mobile Wireless Data Communication with ATmega32 and LED Display

Tech Ambassador Program

7. HC-06 Bluetooth Module Interfacing with ATmega32

15. Android Mobile to HC-05 Bluetooth Module Wireless Data Communication with ATmega32 and LED Display
16. Android Mobile to HC-05 Bluetooth Module Wireless Data Communication with ATmega32 and LCD Display
17. Android Mobile to HC-06 Bluetooth Module Wireless Data Communication with ATmega32 and LCD Display
18. HC-06 Bluetooth Module to Android Mobile Wireless Data Communication with ATmega32 and LCD Display
19. HC-05 Bluetooth Module to Android Mobile Wireless Data Communication with ATmega32 and LED Display
20. HC-05 Bluetooth Module to Android Mobile Wireless Data Communication with ATmega32 and LCD Display

One thought on Getting the Version of HC-05 Bluetooth Module with


ATmega32
Pingback: How to know the Bluetooth version of a HC-05 Bl...

Leave a Reply
You must be logged in to post a comment.

Sitemap | Privacy Policy | Terms & Conditions

5 de 5

Copyright 2016 ABLab Solutions

Powered by SPIS

07-04-2016 12:09

Вам также может понравиться