bluetooth application board-8051

77
BLUETOOTH APPLICATION BOARD WITH 8051 INDEX SR. NO. CONTENT PAGE NO. 1. HOW TO USE APPLICATION BOARD 2 2. BLUETOOTH OVERVIEW 3 3. OVERVIEW OF OPERATION 4 4. BLUETOOTH AND WI-FI 5 5. SECURITY 6 6. APPLICATION 7 7. USER MODE 7 8. HARDWARE CONNECTION 8 9. PICTORIAL VIEW OF BLUETOOTH BOARD 9 10. FUNCTIONING OF BLUETOOTH 10 11. lM400 MODULE 11 12. FEATURES 12 13. CIRCUIT DIAGRAM 13 14. AT COMMAND SET INDEX 14 15. INTRODUCTION TO BLUETOOTH APLICATION BOARD 31 16. HOW TO USE KEIL COMPILER 41 17. HOW TO USE ECE FLASH MAGIC 49 18. OPTIONAL BURNING TOOL 53 ADVANCE TECHNOLOGY www.atechindia.com Page 1

Upload: prateekgupta900

Post on 01-Nov-2014

115 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

INDEX

SR. NO. CONTENT PAGE NO.1. HOW TO USE APPLICATION BOARD 22. BLUETOOTH OVERVIEW 33. OVERVIEW OF OPERATION 44. BLUETOOTH AND WI-FI 55. SECURITY 66. APPLICATION 77. USER MODE 78. HARDWARE CONNECTION 89. PICTORIAL VIEW OF BLUETOOTH BOARD 910. FUNCTIONING OF BLUETOOTH 1011. lM400 MODULE 1112. FEATURES 1213. CIRCUIT DIAGRAM 1314. AT COMMAND SET INDEX 1415. INTRODUCTION TO BLUETOOTH

APLICATION BOARD31

16. HOW TO USE KEIL COMPILER 4117. HOW TO USE ECE FLASH MAGIC 4918. OPTIONAL BURNING TOOL 53

ADVANCE TECHNOLOGY www.atechindia.com Page 1

Page 2: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

HOW TO USE APPLICATION BOARD

1. Install the Bluetooth dongle software, after installing it, you will get a icon on the desktop named as Bluesoleil.

2. give the power supply to the Bluetooth kit, the Bluetooth module is internally connected. thus no need to give the supply to that module externally.

3. Make all the DIP switches OFF in RS232 section.4. Connect the programming cable to the kit to burn the program (with J30).5. After burning the program successfully, make the DIP switch 1, 3, 5 ‘ON’.6. Now connect the dongle to the PC.7. Double click on the bluesoleil software icon.8. A window will poped up, the device lm400 will automatically detected.9. Now right click on the detected lm400 and go to the pair option.10. A window will pop up and will ask for the pass key, this key should be synchronized

or matched ,at both ends that’s why it has been set to “1234”(four time zeroes)11. After entering the pass key”1234”,again right click on lm400 but this time go to

connect option and say ‘yes’.12. A message will be shown in the tray that the “Bluetooth dongle has been connected to

COM”13. If this message does not come then again right click on lm400 and go to the

‘STATUS’ option ,a window will be appeared in that window check for the communication port to which your Bluetooth dongle has been connected

14. Now initiate a hyper terminal connection and connect it to the corresponding port which was shown in either the status option of device or in the message displayed in the tray.

ADVANCE TECHNOLOGY www.atechindia.com Page 2

Page 3: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

BLUETOOTH OVERVIEW

To put it simply, Bluetooth is a technology standard for electronic devices to communicate with each other using short-range radio. It is often referred to as a “cable replacement” technology, because it is commonly used to connect things, such as cameras, headsets, and mobile phones that have traditionally been connected by wires. Bluetooth is much more than simply a way to cut the cord between today’s existing electronic devices. It is an enabling technology that will take these devices to new levels of productivity and functionality and enable a whole new class of devices designed with communications and connectivity in mind.

The Bluetooth Special Interest Group (SIG) defines Bluetooth a bit more broadly as the” Worldwide specification for small-form-factor, low-cost radio solutions that provide links between mobile computers, mobile phones, other portable devices, and connectivity to the Internet." In defining Bluetooth, the SIG has taken a very different approach than the IEEE 802.11b Committees did. Rather than build Bluetooth as an adjunct to TCP/IP, it was defined as a standalone protocol stack that includes all layers required by an application. This means that it encompasses not only wireless communications but also service advertisement, addressing, routing, and a number of application-level interfaces referred to as profiles.Bluetooth is based on a frequency hopping spread spectrum (FHSS) modulation technique. The term spread spectrum describes a number of methods for spreading a radio signal over multiple frequencies, either simultaneously (direct sequence) or in series (frequency hopping.)

Wi-Fi devices are based on direct sequence spread spectrum transmission which uses multiple channels simultaneously. While this technique increases the speed of transmission (for example in Wi-Fi from 1.5MHz to 11MHz), it is more susceptible to interference from other radio sources as well as being a greater source of interference to the surrounding area.

In contrast, Bluetooth utilizes the frequency hopping method of spread spectrum which uses multiple radio channels to reduce interference and increase security. The signal is rapidly switched from channel to channel many times per second in a pseudo-random pattern that is known by both the sender and receiver(s). This provides robust recovery of packet errors caused by interference from another radio source at a particular frequency. Also, data is generally more secure because it is not possible to receive more than a fraction of the data unless the hopping pattern is known. Bluetooth utilizes frequency hopping in the 2.4GHz radio band and hops at a relatively fast pace with a raw data rate of about 1 Mbps. This translates to about 700 kbps of actual useful data transfer. The lm400 module supports a maximum sustained bidirectional data rate of 230.4kbps.

ADVANCE TECHNOLOGY www.atechindia.com Page 3

Page 4: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

OVERVIEW OF OPERATION

The Bluetooth RF (physical layer) operates in the unlicensed ISM band at 2.4GHz. The system employs a frequency hop transceiver to combat interference and fading, and provides many FHSS carriers. RF operation uses a shaped, binary frequency modulation to minimize transceiver complexity. The symbol rate is 1 Mega symbol per second (Msps) supporting the bit rate of 1 Megabit per second (Mbps) or, with Enhanced Data Rate, a gross air bit rate of 2 or 3Mb/s. These modes are known as Basic Rate and Enhanced Data Rate respectively.

During typical operation, a physical radio channel is shared by a group of devices that are synchronized to a common clock and frequency hopping pattern. One device provides the synchronization reference and is known as the master. All other devices are known as slaves. A group of devices synchronized in this fashion form a piconet. This is the fundamental form of communication for Bluetooth wireless technology.Devices in a piconet use a specific frequency hopping pattern which is algorithmically determined by certain fields in the Bluetooth specification address and clock of the master. The basic hopping pattern is a pseudo-random ordering of the 79 frequencies in the ISM band. The hopping pattern may be adapted to exclude a portion of the frequencies that are used by interfering devices. The adaptive hopping technique improves Bluetooth technology co-existence with static (non-hopping) ISM systems when these are co-located.The physical channel is sub-divided into time units known as slots. Data is transmitted between Bluetooth enabled devices in packets that are positioned in these slots. When circumstances permit, a number of consecutive slots may be allocated to a single packet. Frequency hopping takes place between the transmission or reception of packets. Bluetooth technology provides the effect of full duplex transmission through the use of a time-division duplex (TDD) scheme.Above the physical channel there is a layering of links and channels and associated control protocols. The hierarchy of channels and links from the physical channel upwards is physical channel, physical link, logical transport, logical link and L2CAP channel. Within a physical channel, a physical link is formed between any two devices that transmit packets in either direction between them. In a piconet physical channel there are restrictions on which devices may form a physical link. There is a physical link between each slave and the master. Physical links are not formed directly between the slaves in a piconet.The physical link is used as a transport for one or more logical links that support unicast synchronous, asynchronous and isochronous traffic, and broadcast traffic. Traffic on logical links is multiplexed onto the physical link by occupying slots assigned by a scheduling function in the resource manager.A control protocol for the baseband and physical layers is carried over logical links in addition to user data. This is the link manager protocol (LMP). Devices that are active in a piconet have a default asynchronous connection-oriented logical transport that is used to transport the LMP protocol signaling. For historical reasons this is known as the ACL logical transport. The default ACL logical transport is the one that is created

ADVANCE TECHNOLOGY www.atechindia.com Page 4

Page 5: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

whenever a device joins a piconet. Additional logical transports may be created to transport synchronous data streams when this is required.The link manager function uses LMP to control the operation of devices in the piconet and provide services to manage the lower architectural layers (radio layer and baseband layer). The LMP protocol is only carried on the default ACL logical transport and the default broadcast logical transport.Above the baseband layer the L2CAP layer provides a channel-based abstraction to applications and services. It carries out segmentation and reassembly of application data and multiplexing and de-multiplexing of multiple channels over a shared logical link. L2CAP has a protocol control channel that is carried over the default ACL logical transport. Application data submitted to the L2CAP protocol may be carried on any logical link that supports the L2CAP protocol.

BLUETOOTH AND WI-FI

Bluetooth and Wi-Fi are often compared to each other because they are both capable of providing networking on the 2.4GHz consumer frequency band. Many of the differences between these two technologies can be traced to the fact that networking was not the primary design goal for Bluetooth as it was for Wi-Fi. With a greater transmission range (about 100 meters indoors) and larger bandwidth (about 11Mbps), Wi-Fi is typically the better choice for wireless LANs and Internet connectivity.

Bluetooth on the other hand was designed for driverless, cordless connectivity between devices. Because Bluetooth transmitters are smaller in size, have lower power demands, a more limited range (10 - 100 meters) and narrow bandwidth (1Mbps), they are better suited for use in embedded and mobile devices that exchange smaller amounts of information while conserving power and space. While their functionality does not compete directly, 802.11b and Bluetooth do compete for the airwaves. Since they both operate on the 2.4GHz band of the ISM radio spectrum, these two wireless technologies may interfere with each other. Bluetooth devices minimize interference by employing a frequency-hopping spread spectrum scheme that changes the frequency used about 1600 times per second.

Unfortunately, since Wi-Fi uses a direct sequence spread spectrum method, this also means that Bluetooth transmissions will collide with those of any nearby 802.11b devices and slow Wi-Fi data transmission rates. The Bluetooth SIG and its member companies have put a lot of effort into coexistence solutions for these two standards and are very committed to ensuring that these devices work well together.

While 802.11b was designed solely for data communications, Bluetooth takes things quite a bit further. A key component of the Bluetooth standard is its notification and service discovery mechanism. This allows Bluetooth devices to identify themselves and describe their capabilities to other Bluetooth devices in the area. For instance, the Dial-Up Networking profile defines how discoverability can be used to locate and connect to other devices such as a cellular phone that supports the same profile. The profile then describes how to dial the phone, connect to either analog or data services, and control the connection seamlessly. This combination of dynamic discovery of

ADVANCE TECHNOLOGY www.atechindia.com Page 5

Page 6: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

services and built in definitions of the services goes well beyond anything offered by the 802.11b protocol.

SECURITY

Bluetooth security is defined by three main elements: availability, access, and confidentiality. It is important to distinguish between these elements because Bluetooth security is also highly configurable so that it can meet the needs of devices in many different scenarios. An understanding of the basics will provide the knowledge that you need to choose a security strategy for your device. The first important element of Bluetooth security is availability. If a device cannot be seen or connected with, it is obviously quite secure. Bluetooth defines both of these features as part of the security model and they are exposed by the EmbeddedBlue device through the set visible and set connectable commands. This is a very coarse level of control, but it is also quite effective and can be used in combination with other security features.The second and most complex element of Bluetooth security is access control. This type of security is only relevant when the module is connectable and is designed to provideprotection in this case. The general idea is that remote devices must become trusted before they will be allowed to connect and communicate with the EmbeddedBlue module. In order to become trusted, a remote device must present a passkey that matches the stored local passkey. This only needs to be done once, as both devices will remember their trusted status and allow future connections with that specific device without exchanging passkeys again.The EmbeddedBlue module uses the set security command to configure access control.There are three possible settings for security, off, open, and closed. When security is turned off, connection attempts will be allowed from all remote devices. When security is set to open, connections are only allowed from trusted devices, but new devices can become trusted by presenting the correct passkey. Forming a trusted relationship is carried out automatically in this mode the first time that a remote device connects with the EmbeddedBlue module. When security is set to closed, only connections from trusted devices will be allowed and no new devices may become trusted. Closed security is the most restrictive setting and therefore the most secure.The last element of Bluetooth security is confidentiality. Once a link with a trusted device has been established, it may be important to know that the data being transmitted cannot be intercepted by a third party. All transmitted data can be encrypted by configuring the encrypt setting to on. This only has an effect when security is set to either open or closed. The EmbeddedBlue module supports 56-bit encryption by default, but 128-bit encryption is available. Due to export restrictions to certain countries, firmware supporting 128-bitencryption is only available with proper approval from A7 Engineering.

ADVANCE TECHNOLOGY www.atechindia.com Page 6

Page 7: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

APPLICATION OF BLUETOOTH

Data synchronization need never again be a problem as your Bluetooth enabled PDA, PC or laptop all talk to each other and update their respective files to the most recent ones.

Traveling in a plane, a person may write but not send e-mail. When the plane touches down the Bluetooth enabled laptop will communicate with the user's phone and will automatically send them. Mice and keyboards will identify themselves to the computer without intervention, or could also be used to command TVs, videos or hi-fis at the touch. Use e-mail while your laptop is still in the briefcase! When your laptop receives e-mail, you'll get an alert on your mobile phone. You can also browse all incoming e-mails and read those you select in the mobile phone's display.A traveling businessperson could ask his laptop computer to locate a suitable printer as soon as he enters a hotel lobby, and send a printout to that printer when it has been found.

USER MODES

COMMAND MODEThe lm400 supports two main operating modes: command mode and data mode. Upon power up, the lm400 enters command mode and is ready to accept serial commands. The factory default communication parameters are 9600 Baud, 8 Data Bits, 1 Stop Bit, No Parity, and No Flow Control. The lm400 supports commands to modify the baud rate and flow control settings.

In this mode there are a number of commands that can be sent to change the baud rate, locate other devices that are in range, check the firmware version, etc. All commands are sent using visible ASCII characters (123 is 3 bytes “123”). Upon the successful transmission of a command, the ACK string will be returned. If there is a problem in the syntax of the transmission then a NAK string is returned. After either the ACK or NAK, a carriage-return <CR> character is returned. When a prompt (<CR> followed by a ‘>’) is returned, it means that the lm400 radio is in the idle state and is waiting for another command. White space is used to separate arguments of the command and a carriage-return <CR> (ASCII 13) is used to mark the end of the command.

DATA MODE

Once the lm400 radio is connected to another Bluetooth device, the lm400 automatically switches into data mode. All data transmitted while in this mode will be sent to the remote device and, therefore, NO further commands can be sent until the lm400 radio is disconnected or switched back to command mode by use of the mode control I/O line or the Switch to Command Mode sequence.The connection status line of the lm400 module can be monitored to determine if there is an active connection. Additionally, whenever a connection is present, the Connection Status LED on the lm400 module will be on.

ADVANCE TECHNOLOGY www.atechindia.com Page 7

Page 8: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

SWITCHING BETWEEN DATA MODE AND COMMAND MODE

When a Connection command is issued, the lm400 attempts to establish a connection to the device with the address specified in the command. Once a connection is established, the lm400 switches into data mode. At this point all data sent to the lm400 is transmitted to the remote Bluetooth device over the wireless link. It is possible to switch from data mode to command mode, issue commands, and then return to data mode, while maintaining a connection. The lm400 allows you to switch between data mode and command mode by issuing the Switch to Command Mode and Return to Data Mode commands or by driving the MODE control I/O line (PD5) of the lm400 module.

MODULE ANTENNA OPTION

The lm400 module is available in two models. The lm400-AHC-IN features a high quality surface mount antenna and is designed for ease of integration when an external antenna is not required. For applications where an external antenna is required, such as those mounted in RF limiting enclosures or locations, the lm400-AHC-EN features an SMA coax connector allowing for cabled antenna solutions. This model provides a great deal of flexibility in antenna selection.

HARDWARE CONNECTIONS

BLOCK DIAGRAM OF BLUETOOTH BOARD

ADVANCE TECHNOLOGY www.atechindia.com Page 8

LCD SECTIONADC AND LM35 SECTION

RELAY AND BUZZER SECTION

EEPROM AND RTC SECTION

89C51

BLUETOOTH

MODEM

LED SECTION

4X4 KEYPAD

RS232 DIP SW &PROG. SECTION

STEPPER MOTOR

Page 9: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

PICTORIAL VIEW OF BLUETOOTH APPLICATION BOARD

COMMUNICATION BETWEEN BLUETOOTH BOARD & COMPUTER

ADVANCE TECHNOLOGY www.atechindia.com Page 9

Page 10: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

FUNCTIONING OF BLUETOOTH

BLUETOOTH LINK

ADVANCE TECHNOLOGY www.atechindia.com Page 10

BLUETOOTH SOFTWARE

BLUETOOTH DONGLE

HYPERTERMINAL FOR SEEING ANY SERIALLY COMING DATA

BLUETOOTH MODULE PROCESSOR

USB PORT

Page 11: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

BLUETOOTH MODULE

lm400 Module

ADVANCE TECHNOLOGY www.atechindia.com Page 11

Page 12: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

FEATURESBluetooth Ver. 2.0+ EDR certificationTransmit Power up to +18dBm (Class1)Low current consumption:Hold, Sniff, Park, Deep sleep mode3.0V to 3.6V operationFull Bluetooth Data rate over UART and USBSupport up to 7 ACL links and 3 SCO linksEnhanced Data Rate(EDR) compliantfor both 2Mbps and 3Mbps modulation modesInterface: USB, UART&PCM( for voice codec)SPP pro_le comes as standard,HSP/HFP,HID,DUN are availabpro_les leSupport for 802.11 Co - ExistenceRoHS CompliantSmall outline: 30mm x 27mmX 2.8 mmApplicationAccess pointDomestics and Industrial applicationsPersonal Digital Assistants(PDA)Serial AdapterG PS, PO S, Barcode ReaderDigital camera, Printer& Cellular phoneCordless handset

ADVANCE TECHNOLOGY www.atechindia.com Page 12

Page 13: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

CIRCUIT DIAGRAM OF BLUETOOTH APPLICATION BOARD

ADVANCE TECHNOLOGY www.atechindia.com Page 13

Page 14: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

AT COMMAND SET INDEX

2 AT command Set.....................................................................................................................16

2.1 History .................................................................................................................................16

2.2 Terminology ........................................................................................................................16

2.3 Command format ................................................................................................................16

2.4 Command Response ............................................................................................................17

2.5 Host Events ..........................................................................................................................17

2.6 Operation Mode: .................................................................................................................17

2.7 Command Types ..................................................................................................................18

2.8 Command Description .........................................................................................................18

2.8.1 AT .....................................................................................................................................18

2.8.2 AT+VER ............................................................................................................................ 18

2.8.3 AT+ENQ ........................................................................................................................... 19

2.8.4 AT+RESET ......................................................................................................................... 19

2.8.5 AT+BAUD ......................................................................................................................... 19

2.8.6 AT+STOP .......................................................................................................................... 20

2.8.7 AT+PAR ............................................................................................................................ 21

2.8.8 AT+FLOW ......................................................................................................................... 21

2.8.9 AT+ECHO ......................................................................................................................... 22

2.8.10 AT+RESP ......................................................................................................................... 22

2.8.11 AT+ROLE ........................................................................................................................ 22

2.8.12 AT+ADDR ....................................................................................................................... 23

2.8.13 AT+FIND ......................................................................................................................... 23

2.8.14 AT+RSSI .......................................................................................................................... 24

2.8.15 AT+NAME ...................................................................................................................... 24

ADVANCE TECHNOLOGY www.atechindia.com Page 14

Page 15: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

2.8.16 AT+PIN ........................................................................................................................... 24

2.8.17 AT+DCOV ....................................................................................................................... 25

2.8.18 AT+CONN ....................................................................................................................... 26

2.8.19 AT+DROP ....................................................................................................................... 25

2.8.20 AT+BOND ....................................................................................................................... 27

2.8.21 AT+ACON ....................................................................................................................... 27

2.8.22 AT+ESC ........................................................................................................................... 28

2.8.23 AT+AUTO ....................................................................................................................... 28

2.8.24 AT+RCFG ........................................................................................................................ 28

2.8.25 AT+SLEEP ....................................................................................................................... 29

2.9 Default Factory Settings ………………………………………………………………......30

ADVANCE TECHNOLOGY www.atechindia.com Page 15

Page 16: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

2. AT COMMAND SET

2.1 HISTORY

The AT command set was developed by Hayes to control the operation of telephony modems. The command set has been extended to control bluetooth device primary operation such as inquiry, connection setup/ disconnection etc. Other AT commands are also available to control the serial port setup and other user friendly features. The Bluetooth device powers up in unconnected state and can be configured using UART interface similar to telephony modems. The device will act as Bluetooth slave by default and can be inquired/connect from other Bluetooth master device in neighborhood. The AT commands can be used to change the default behavior and settings for the current as well as future power up cycles.

2.2 TERMINOLOGY

Symbol Description ASCII value (Hex) <cr> Carriage Return 0x0D <lf> Line Feed 0x0A <cr,lf> Carriage return and line

feed 0x0D, 0x0A

XXXXXXXXXXXX 12 hexadecimal BD address sequence

<parameters> The parameters are required for most of the commands. The parameter may be ‐character, integer and character sequence (BD address, Pin code, Name etc) depending on the command operation. <cr> This character terminates the command packet and signals the device to proceed with ‐command execution.

2.3 COMMAND FORMAT

All the AT commands except the “AT” test command use the below command structure:

<header><name>< parameters> <cr> <header> Each command will start with “AT+” character sequence except “AT” test command. ‐<name> Command name as shown in below table listing all the available commands‐<parameters> The parameters are required for most of the commands. The parameter may be ‐character, integer and character sequence (BD address, Pin code, Name etc) depending on the command operation. <cr> This character terminates the command packet and signals the device to proceed with ‐command execution

ADVANCE TECHNOLOGY www.atechindia.com Page 16

Page 17: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

2.4 COMMAND RESPONSE

The AT commands will have the response in the below format:

<parameter,value><command_response>

<parameter,value> This sequence will be part of response to the commands sent in query ‐format. e.g. STOP1 where STOP is the parameter related to serial port stop bits and 1 is the parameter value. <command_response> The command response can be any one of following types: ‐<cr,lf>OK<cr,lf> If the command has been sent to Bluetooth device in correct format and is ‐applicable in current device operating mode. <cr,lf>ERROR<cr,lf> If the command has been sent in wrong format/command is invalid/ ‐command is not applicable in current device operating mode. <cr,lf> If the command response has been disabled. ‐

2.5 HOST EVENTSHost device connected to Bluetooth device will receive an event sequence on occurrence of Bluetooth related events. Different <host_event> are:

<cr,lf>CONNECT “XXXXXXXXXXXX”<cr,lf> The event sequence will be received on a successful ‐connection attempt either by local device or from a remote bluetooth device. <cr,lf>CONNECT Attempt Fail<cr,lf> When the attempted connection attempt from the local ‐Bluetooth device fails for some reason. The reason for connection failure will not be listed. <cr,lf>DISCONNECT “XXXXXXXXXXXX”<cr,lf> On the disconnection of the current active ‐connection, the sequence will be received. <cr,lf>Inquiry Cancelled<cr,lf> When the inquiry operation from the local Bluetooth device is ‐pre terminated using the AT command, the event will be sent to host device.

2.6 OPERATION MODE

The device will always be in one of the below operating modes: Online Data Mode

Data transfer mode when device is in connected state.

Command Mode Accepts AT command for device configuration.

Online Command Mode Accepts almost all AT commands for device configuration in connected state.

ADVANCE TECHNOLOGY www.atechindia.com Page 17

Page 18: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

2.7 COMMAND TYPES

2.8 COMMAND DESCRIPTION

2.8.1 AT

This command allows the connected host device to check the availability of the Bluetooth device. The connected host device must have same serial port settings as configured for the Bluetooth device. 2.8.1.1 SYNTAX

AT<cr> 2.8.1.2 RESPONSE

<command_response> 2.8.2 AT+VER

Returns the device firmware version

ADVANCE TECHNOLOGY www.atechindia.com Page 18

Page 19: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

2.8.2.1 SYNTAXAT+VER<cr>

2.8.2.2 RESPONSE <cr,lf>FW VERSION: vX.YZ<command_response> Where X: Major release of device firmware

YZ: Minor release/updates of device firmware e.g. FW VERSION: v4.50

2.8.3 AT+ENQ List all the device information and all the settings along with their brief description. The settings include serial port, Bluetooth related and other misc settings.

2.8.3.1 SYNTAXAT+ENQ<cr>

2.8.3.2 RESPONSE <command_response> <cr,lf><Parameter Setting, Brief Description><cr,lf> for each parameter. e.g. device role setting will be listed as “<cr,lf>ROLEM, MASTER ROLE <cr,lf>”. All other settings and other device information is listed in similar manner.

2.8.4 AT+RESET This command is used to restore the default factory settings and perform device reboot. The default factory settings are listed in table [reference]

2.8.4.1 SYNTAXAT+RESET<cr>

2.8.4.2 RESPONSE <command_response>

2.8.5 AT+BAUD The command allows setting the baud rate for the serial UART port. The current baud rate setting can also be retrieved by using the sending this command in query format.

ADVANCE TECHNOLOGY www.atechindia.com Page 19

Page 20: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

2.8.5.1 AT+BAUDb<cr> where b – varies from 10 to 19 for different baud rates. The baud rate varies from 1200bps to 921 Kbps. e.g. To set 19200 as UART baud rate, the command is AT+BAUD14<cr>

2.8.5.1.1 RESPONSE <command_response>

2.8.5.2 AT+BAUD?<cr>

2.8.5.2.1 RESPONSE<cr,lf>BAUDb<command_response> if the command is successful. Here, b current baud rate setting. E.g on default setup, the response will be ‐<cr,lf>BAUD14<command_response>

2.8.6 AT+STOP

The command is used to specify one or two stop bits for serial port communication. The current setting can also be retrieved by using the sending this command in query format. 2.8.6.1 AT+STOPn<cr>

where n – can be 1 or 2 depending on no of stop bits used

2.8.6.2 RESPONSE <command_response>

ADVANCE TECHNOLOGY www.atechindia.com Page 20

Page 21: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

2.8.6.3 AT+STOP?<cr>

2.8.6.3.1 RESPONSE <cr,lf>STOPn<command_response> if the command is successful. Here, n no of stop bits. E.g on default setup, the response will be ‐<cr,lf>STOP1<command_response>

2.8.7 AT+PAR

The command is used to specify the parity type of serial port. The current setting can also be retrieved by using the sending this command in query format. 2.8.7.1 AT+PARn<cr>

where n – varies from 0 to 2 depending on the type of parity used

2.8.7.1.1 RESPONSE <command_response>

2.8.7.2 AT+PAR?<cr>

2.8.7.2.1 RESPONSE<cr,lf>PARn<command_response> if the command is successful. Here, n ‐parity type. E.g on default setup, the response will be <cr,lf>PAR0<command_response>

2.8.8 AT+FLOW

The command is used to enable/disable the RTS/CTS flow control for the serial port. The current setting can also be retrieved by using the sending this command in query format.

2.8.8.1 AT+FLOWc<cr>

Where parameter c is a character used to enable/disable the flow control

Note, this command will cause the device to reboot.

2.8.8.1.1 Response <command_response >

ADVANCE TECHNOLOGY www.atechindia.com Page 21

Page 22: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

2.8.8.2 AT+FLOW?<cr>

2.8.8.2.1 Response <cr,lf>FLOWc<command_response> if the command is successful. Here, c ‐current flow control setting. E.g on default setup, the response will be <cr,lf>FLOW+<command_response>

2.8.9 AT+ECHO

The command is used to enable/disable the echo back of command characters from the Bluetooth device. The current setting can also be retrieved by using the sending this command in query format.

2.8.9.1 AT+ECHOc<cr> Where parameter c is a character used to enable/disable the echo back feature.

2.8.9.1.1 Response <command_response>

2.8.9.2 AT+ECHO?<cr>

2.8.9.2.1 Response <cr,lf>ECHOc<command_response> if the command is successful. Here, c ‐current echo back setting. E.g on default setup, the response will be <cr,lf>ECHO+<command_response>

2.8.10.1.1RESPONSE<command_response>

2.8.10.2 AT+RESP?<cr>

2.8.10.2.1RESPONSE<cr,lf>RESPc<command_response> if the command is successful. Here, c‐ current command response setting. E.g on default setup, the response will be <cr,lf>RESP+<command_response>

2.8.11 AT+ROLE

The command is used to set the local device as Bluetooth Master/Slave. The current setting can also be retrieved by using the sending this command in query format.

ADVANCE TECHNOLOGY www.atechindia.com Page 22

Page 23: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

2.8.11.1 AT+ROLEc<cr>

Where parameter c is a character used to configure the local device type

Note, this command will cause the device to reboot.

2.8.11.1.1RESPONSE<command_response>

2.8.11.2 AT+ROLE?<cr>

2.8.11.2.1RESPONSE<cr,lf>ROLEc< command_response> if the command is successful. Here, c current device type setting. E.g on default setup, the response will be ‐<cr,lf>ROLES< command_response>

2.8.12 AT+ADDR

This command is used to display the Bluetooth address of the local device.

2.8.12.1 AT+ADDR?<cr>

2.8.12.1.1 RESPONSE<cr,lf><XXXX XX XXXX>< command_response> if the command is successful. Here, ‐ ‐XXXX XX XXXX is the Bluetooth address of local device‐ ‐

2.8.13 AT+FIND

This command is used to search for any Bluetooth device in the neighborhood within one minute. If any device is found, its name and address will be listed. Maximum limit of devices searched is 8. The search ends with a message “Inquiry ends. xx device(s) found.” This command is available only when the adaptor is in the manual master role.

2.8.13.1 AT+FIND?<cr>

2.8.13.1.1RESPONSE <command_response><cr,lf>Inquiry Results:<cr,lf> <Sr No><DeviceName><XXXX XX XXXX><cr,lf> for every device found. ‐ ‐Here, XXXX XX XXXX is the Bluetooth address of local device. e.g. “1 ‐ ‐Serial Adapter 001E 3A 2CDAB7”‐ ‐

ADVANCE TECHNOLOGY www.atechindia.com Page 23

Page 24: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

2.8.13.2 AT+FIND<cr>

This command will cancel the ongoing search operation. If the search is finished (1 minute timeout / max devices found), then the command will return error.

2.8.13.2.1RESPONSE<cr,lf> Inquiry cancelled<command_response>

2.8.14 AT+RSSI

Inquire RSSI value for current bluetooth connection. This command is available in online command mode when the device is in connected state.

2.8.14.1 AT+RSSI<cr>

2.8.14.1.1RESPONSE<cr,lf><RSSI><command_response> <RSSI> can be STRONG/AVERAGE/WEAK depending on the received ‐radio signal strength.

2.8.15 AT+NAME

This command is used to specify a name for the adaptor. You can specify a friendly name using 0 to 9, A to Z, a to z, space and –, which are all valid characters. Note that “first space or , last space or – isn’t permitted”. The default name is “Serial Adapter”. ‐The current device name can be retrieved by using the sending this command in query format. 2.8.15.1 AT+NAME=XXXX<cr>

Where the parameter ”XXXX” is a character string with a maximal length of 16.

2.8.15.1.1RESPONSE<command_response>

2.8.15.2 AT+NAME?<cr>

2.8.15.2.1RESPONSE<cr,lf><NAME><command_response> if the command is successful. Here, <NAME> is the device name . E.g on default setup, the response will be <cr,lf>Serial Adapter<command_response>

2.8.16 AT+PIN This command is used to specify a PIN code for a secured bluetooth connection. The default PIN is "1234". Paired Bluetooth devices should have a same PIN code. The current pin code setting can be retrieved by using the sending this command in query format.

ADVANCE TECHNOLOGY www.atechindia.com Page 24

Page 25: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

2.8.16.1 AT+PIN=XXXX<cr> Where the parameter ”XXXX” is a 4 8 digit string. ‐

2.8.16.1.1RESPONSE<command_response>

2.8.16.2 AT+PIN<cr> This command will cancel the pin code security for Bluetooth connections. The remote Bluetooth device must also cancel pin code security in order to connect successfully with local Bluetooth device. Some devices e.g. Mobile phone do not allow connection without pin code security so disabling pin code security will prohibit successful connection with these devices.

2.8.16.2.1RESPONSE<command_response>

2.8.16.3 AT+PIN?<cr>

2.8.16.3.1RESPONSE<cr,lf><PIN><command_response> if the command is successful. Here, <PIN> is the pin code in use . E.g on default setup, the response will be <cr,lf>1234<command_response> .Incase, the pin code security is disabled the response will be <cr,lf>NULL<command_response>

2.8.17 AT+DCOV It is used to specify whether the adaptor can be discovered or connected by remote devices. The current setting can also be retrieved by using the sending this command in query format.

2.8.17.1 AT+DCOVc<cr> Where parameter c is a character used to enable/disable the discoverability status

Note, this command will cause the device to reboot.

2.8.17.1.1RESPONSE<command_response>2.8.17.2 AT+DCOV?<cr>

2.8.17.2.1RESPONSE<cr,lf>DCOVc<command_response> if the command is successful. Here, c current discoverability status setting. E.g on default setup, the ‐response will be <cr,lf>DCOV+<command_response>

ADVANCE TECHNOLOGY www.atechindia.com Page 25

Page 26: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

2.8.18 AT+CONN This command is used to establish a connection. It is available only when the local Bluetooth device is in the manual master role.

2.8.18.1 AT+CONN<cr>

Connect the local bluetooth device to specified bonded bluetooth device. It is available only when "AT+BOND=xxxxxxxxxxxx" is executed..

2.8.18.1.1RESPONSE<command_response><host_event> where <host_event> will be connection related event and depends on the connection attempt result.

2.8.18.2 AT+CONN= XXXXXXXXXXXX<cr>

Connect the local bluetooth device to the bluetooth device address specified by XXXXXXXXXXXX.

2.8.18.2.1RESPONSE<command_response><host_event> where <host_event> will be connection related event and depends on the connection attempt result.

2.8.18.3 AT+CONNn<cr>

Where parameter n is list index of the remote device found through AT+FIND? command.

n varies from 1 to 8. ‐

2.8.18.3.1RESPONSE<command_response><host_event> where <host_event> will be connection related event depending on the connection attempt result.

2.8.19 AT+DROP

This command is used to drop connection from master or slave device. It is only allowed in online command mode when the device is in connected state.

2.8.19.1 AT+DROP<cr> Drop current connection when the device in online command mode.

2.8.19.1.1RESPONSE<command_response><host_event> where <host_event> will be dis‐connection event.

ADVANCE TECHNOLOGY www.atechindia.com Page 26

Page 27: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

2.8.20 AT+BOND For security purpose, this command is used to specify a unique remote Bluetooth device to be connected. In the master role, the local device pairs and connects with the designated remote slave address. In the slave mode, this command is a filter condition to accept the connection request from the master device. The current bonded device address can be retrieved by using the sending this command in query format.

2.8.20.1 AT+BOND=XXXXXXXXXXXX<cr>

2.8.20.1.1RESPONSE<command_response>

2.8.20.2 AT+BOND<cr> Restore the status in which the local Bluetooth device can connect with any remote device. There is no device bonded with local device.

2.8.20.2.1RESPONSE<command_response>

2.8.20.3 AT+BOND?<cr>

2.8.20.3.1RESPONSE<cr,lf><XXXX XX XXXX><command_response> if the command is ‐ ‐successful. Here, XXXX XX XXXX is the Bluetooth address of bonded ‐ ‐device. . E.g on default setup, there will be no bonded device, hence the response will be <cr,lf>0000 00 0000<cr,lf><command_response> ‐ ‐

2.8.21 AT+ACON This command is used to enable/disable auto connection feature in the master role. The‐ current setting can also be retrieved by using the sending this command in query format.

2.8.21.1 AT+ACONc<cr> Where parameter c is a character used to enable/disable the auto connection feature.

Note, this command will cause the device to reboot. In Manual connect type, the local device (if master type) will need to use AT+FIND? command to find Bluetooth devices in neighborhood and then use AT+CONNn to connect to specific device.

2.8.21.1.1RESPONSE<command_response>

ADVANCE TECHNOLOGY www.atechindia.com Page 27

Page 28: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

2.8.21.2 AT+ACON?<cr>

2.8.21.2.1RESPONSE<cr,lf>ACONc<command_response> if the command is successful. Here, c ‐current connect type setting. E.g on default setup, the response will be <cr,lf>ACON+<command_response>

2.8.22 AT+ESC

This command Disable/Enable the handling of escape sequence “+++”. Note: The escape sequence must be sent with guard time of 1000 msec. The current setting can also be retrieved by using the sending this command in query format.

2.8.22.1 AT+ESCc<cr> Where parameter c is a character used to enable/disable the escape sequence handling

Note: When the device is in data mode (connected state), it can be forced into online Command mode during active connection to the remote device. The "+++" escape sequence must be sent with guard time of 1000msec. The next AT command must be sent after waiting for the response "<cr,lf>OK<cr,lf>" to indicate switching from online data mode to online command mode.

2.8.22.1.1RESPONSE<command_response>

2.8.22.2 AT+ESC?<cr>

2.8.22.2.1RESPONSE <cr,lf>ESCc<command_response> if the command is successful. Here, c current ‐status. E.g on default setup, the response will be <cr,lf>ESC+<command_response>

2.8.23 AT+AUTO The command directs the device to switch from online command mode to online data mode. This command is only allowed in connected state. 2.8.23.1 AT+AUTO<cr>

2.8.23.1.1RESPONSE<cr,lf>OK<cr,lf>

2.8.24 AT+RCFG This command enables or disables configuration from the remote device by executing the remote access hand shaking protocol. Please ask for separate document for remote configuration details. The current setting can also be retrieved by using the sending this command in query format.

ADVANCE TECHNOLOGY www.atechindia.com Page 28

Page 29: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

2.8.24.1 AT+RCFGc<cr> Where parameter c is a character used to enable/disable the remote configuration

2.8.24.1.1RESPONSE<command_response>

2.8.24.2 AT+RCFG?<cr> 2.8.24.2.1Response

<cr,lf>RCFGc<command_response> if the command is successful. Here, c current ‐setting. E.g on default setup, the response will be <cr,lf>RCFG+<command_response>

2.8.25 AT+SLEEP This command is used to enable/disable auto power saving feature of RS232 driver as ‐well as low power modes of Bluetooth device. The current setting can also be retrieved by sending this command in query format.

2.8.25.1 AT+SLEEPc<cr> Where parameter c is a character used to enable/disable the auto power saving feature

2.8.25.1.1RESPONSE<command_response>

2.8.25.2 AT+SLEEP?<cr>

2.8.25.2.1RESPONSE<cr,lf>SLEEPc<command_response> if the command is successful. Here, c current setting. E.g on default setup, the response will be <cr,lf>SLEEP‐ ‐<command_response>

ADVANCE TECHNOLOGY www.atechindia.com Page 29

Page 30: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

2.9 DEFAULT FACTORY SETTINGS

ADVANCE TECHNOLOGY www.atechindia.com Page 30

Page 31: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

EMBEDDED BLUETOOTH EXPERIMENTAL HAS ON BOARD SECTIONS

(a) Analog to Digital Converter and LM-35Temperature sensing section.(b) Real Time Control & EEPROM section.(c) DISPLAY (LCD, LED) section.(d) 4x4 matrix keypad section (e) RELAY and BUZZER section.(f) Stepper motor section(g) RS-232 (FOR SERIAL COMM.) section.

CENTRAL PROCESSORMicro controller: - P89V51RD2Crystal frequency: - 11.0592MHzInternal FLASH Memory: - 64K

MEMORY 4K memory which can be upgradeable to 516k is provided in EEPROM section.

PERIPHERALS

Part No. SpecificationsADC0804CCN 8-BIT 1-CHANNEL, 100s.LM 35 5 VDS1307 SERIAL I2C Real Time Clock.24C04 4K serial EEPROM().LCD 16 x 2 character LCDBUZZER 5VRELAY 5A/250V AC

Stepper Motor 5V, 6 wire

POWER SUPPLY REQUIREMENTS

Voltage Current+/- 5 V 1A+ 12V 1A

ADVANCE TECHNOLOGY www.atechindia.com Page 31

Page 32: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

P89V51RD2

FEATURES• On-chip Flash Program Memory with In-System Programming (ISP) and In-Application Programming (IAP) capability• Boot ROM contains low-level Flash programming routines for downloading via the UART• Can be programmed by the end-user application (IAP)• Parallel programming with 89V51 compatible hardware interface to programmer• Supports 6-clock/12-clock mode via parallel programmer (default clock mode after Chip Erase is 12-clock)• 6-clock/12-clock mode Flash bit erasable and programmable via ISP• 6-clock/12-clock mode programmable “on-the-fly” by SFR bit• Peripherals (PCA, timers, UART) may use either 6-clock or 12-clock mode while the CPU is in 6-clock mode• Speed up to 20 MHz with 6-clock cycles per machine cycle (40 MHz equivalent performance); up to 33 MHz with 12 clocks per machine cycle• Fully static operation• RAM expandable externally to 64 Kbytes• Four interrupt priority levels• Seven interrupt sources• Four 8-bit I/O ports• Full-duplex enhanced UART

– Framing error detection– Automatic address recognition

• Power control modes– Clock can be stopped and resumed– Idle mode– Power down mode

• Programmable clock-out pin• Second DPTR register• Asynchronous port reset• Low EMI (inhibit ALE)• Programmable Counter Array (PCA)

– PWM

ADVANCE TECHNOLOGY www.atechindia.com Page 32

Page 33: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

BOX HEADER CONNECTIONS

JP6

JP1

JP4

JP9 JP6

JP8 JP11

COMPONENTS ON BLUETOOTH BOARD

ADVANCE TECHNOLOGY www.atechindia.com Page 33

Pin No. Signal Pin No. Signal 1 VCC 6 P2_4 2 P2_0 7 P2_5 3 P2_1 8 P2_6 4 P2_2 9 P2_7 5 P2_3 10 GND

Pin No. Signal Pin No. Signal 1 VCC 6 P0_4 2 P0_0 7 P0_5 3 P0_1 8 P0_6 4 P0_2 9 P0_7 5 P0_3 10 GND

Pin No. Signal Pin No. Signal 1 VCC 6 T0 2 RX2 7 T1 3 TX2 8 WR 4 INT0 9 RD 5 INT1 10 GND

Pin No. 1 2 3 4 5 6 Signal VCC P1_4 P1_5 P1_6 P1_7 GND

Pin No. 1 2 3 4 5 6 Signal VCC P1_0 P1_1 P1_2 P1_3 GND

Pin No. 1 2 3 4 5 6 Signal VCC INT0 INT1 T0 T1 GND

Pin No. 1 2 3 4 Signal RD WR ALE GND

JP10

JP1(P0)

JP4(P2)

JP10(P1L)

JP9(P1U)JP8

JP11

Page 34: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

ANALOG TO DIGITAL CONVERTER (0804)

FEATURES Easy interface to all microprocessors Operates ratiometrically or with 5 VDC or analog span No zero or full-scale adjust required 0V to 5V input range with single 5V power supply Outputs meet TTL voltage level specifications

SPECIFICATIONS Resolution 8 Bits Total Unadjusted Error ±1⁄2 LSB and ±1 LSB Single Supply 5 VDC Low Power 15 mW Conversion Time 100

JP28

RTC & E2PROM

RTC DS1307 FEATURES

Real-time clock (RTC) counts seconds, minutes, hours, date of the month, month, day of the week, and year with leap-year compensation valid up to 2100

56-byte, battery-backed, nonvolatile (NV) RAM for data storage Two-wire serial interface Programmable square wave output signal Automatic power-fail detect and switch circuitry Consumes less than 500nA in battery backup mode with oscillator running Optional industrial temperature range: -40°C to +85°C Available in 8-pin DIP or SOIC Underwriters Laboratory (UL) recognized

E2PROM 24C04

ADVANCE TECHNOLOGY www.atechindia.com Page 34

Pin No. 1 2 3 4 Signal VCC EOC RD SOC

Page 35: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

FEATURESLow-voltage and Standard-voltage Operation

– 2.7 (VCC = 2.7V to 5.5V)– 1.8 (VCC = 1.8V to 5.5V)

Internally Organized 128 x 8 (1K), 256 x 8 (2K), 512 x 8 (4K), 1024 x 8 (8K) or 2048 x 8 (16K)

2-wire Serial Interface Schmitt Trigger, Filtered Inputs for Noise Suppression Bi-directional Data Transfer Protocol 100 kHz (1.8V) and 400 kHz (2.5V, 2.7V, 5V) Compatibility Write Protect Pin for Hardware Data Protection 8-byte Page (1K, 2K), 16-byte Page (4K, 8K, 16K) Write Modes Partial Page Writes are Allowed Self-timed Write Cycle (5 ms max) High-reliability

– Endurance: 1 Million Write Cycles– Data Retention: 100 Years

Automotive Grade, Extended Temperature and Lead-Free Devices Available 8-lead PDIP, 8-lead JEDEC SOIC, 8-lead MAP, 5-lead SOT23, 8-lead TSSOP and 8-ball dBGA2™ Packages

JP18

JP20

ADVANCE TECHNOLOGY www.atechindia.com Page 35

Pin No. 1 2 3 4 5 6 Signal VCC_MEM SDATA SCLK GND

3.6V Battery

Square Wave Out 32.678KHz Crystal

JP18

Page 36: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

REAL TIME

CONTROL (Real time Clock)

The DS1307 Serial Real-Time Clock is a low-power, full binary-coded decimal (BCD) clock/calendar plus 56 bytes of NV SRAM. Address and data are transferred serially via a 2-wire, bi-directional bus.The clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The end of the month date is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with AM/PM indicator. TheDS1307 has a built-in power sense circuit that detects power failures and automatically switches to the battery supply.

EEPROM The AT24C01A/02/04/08/16 provides 1024/2048/4096/8192/16384 bits of serial electrically erasable and programmable read-only memory (EEPROM) organized as128/256/512/1024/2048 words of 8 bits each. The device is optimized for use in many industrial and commercial applications where low-power and low-voltage operation are essential. The AT24C01A/02/04/08/16 is available in space-saving 8-lead PDIP,8-lead JEDEC SOIC, 8-lead MAP, 5-lead SOT23 (AT24C01A/AT24C02/AT24C04), 8-lead TSSOP and 8-ball dBGA2 packages and is accessed via a 2-wire serial interface. In addition, the entire family is available in 2.7V (2.7V to 5.5V) and 1.8V (1.8V to 5.5V)

AT24C04, 4K SERIAL EEPROM: Internally organized with 32 pages of 16 bytes each, the 4K requires a 9-bit data word address for random word addressing.

LED SECTION

ADVANCE TECHNOLOGY www.atechindia.com Page 36

Pin No. 1 2 Signal SQ_OUT GND_MEM

Pin No. Signal Pin No. Signal 1 VCC 6 LED4 2 LED0 7 LED5 3 LED1 8 LED6 4 LED2 9 LED7 5 LED3 10 GND

Page 37: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

RELAY AND BUZZER SECTION

JP27

Pin No. 1 2 3 4 5 6 Signal RELAY2 RELAY1 BUZZER GND_REL

JP30

JP24 JP32

STEPPER MOTOR

ADVANCE TECHNOLOGY www.atechindia.com Page 37

Pin No. 1 2 Signal +12V_REL GND_REL

Pin No. 1 2 3 Signal NO COM NC

Pin No. 1 2 3 Signal NO COM NC

JP27

12V

RELAY1

JP24JP32

BUZZER

RELAY 2

JP14

Page 38: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

JP12

JP16Pin No. 1 2 3 4 5 6Signal STEP1_0 STEP1_1 STEP1_2 STEP1_3 +5V_ST +5V_ST

LCD CONNECTIONS

ADVANCE TECHNOLOGY www.atechindia.com Page 38

Pin No. Signal 1 Vcc 2 ST1_0 3 ST1_1 4 ST1_2 5 ST1_3 6 NC 7 NC 8 NC 9 NC 10 GND

JP12

JP16

Page 39: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

JP2

COMMANDS FOR LCDINSTRUCTION Decimal Hexadecima

lFunction set (8-bit interface, 2 lines, 5*7 Pixels) 56 38Function set (8-bit interface, 1 line, 5*7 Pixels) 48 30Function set (4-bit interface, 2 lines, 5*7 Pixels) 40 28Function set (4-bit interface, 1 line, 5*7 Pixels) 32 20Entry mode set See Below See BelowScroll display one character right (all lines) 28 1EScroll display one character left (all lines) 24 18Home (move cursor to top/left character position) 2 2Move cursor one character left 16 10Move cursor one character right 20 14Turn on visible underline cursor 14 0ETurn on visible blinking-block cursor 15 0FMake cursor invisible 12 0CBlank the display (without clearing) 8 08Restore the display (with cursor hidden) 12 0CClear Screen 1 01Set cursor position (DDRAM address) 128 + addr 80+ addrSet pointer in character-generator RAM (CG RAM address) 64 + addr 40+ addr

POWER SUPPLY CONNECTIONS JP7

Pin No. 1 2 3 4 5Signal +5V GND -5V +12V GND

ADVANCE TECHNOLOGY www.atechindia.com Page 39

Pin No. Signal Pin No. Signal1 VCC 6 DB42 DB0 7 DB53 DB1 8 DB64 DB2 9 DB75 DB3 10 GND

Page 40: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

JP34 JP35

HOW TO USE KEIL COMPILER

STEP: 1Double Click on the icon present on the desktop.

ADVANCE TECHNOLOGY www.atechindia.com Page 40

Pin No. 1 2 Signal -5V GND

Pin No. 1 2 Signal +12V GND

Page 41: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

STEP: 2 The following window will be popped-up

STEP: 3

Go to the project & click on new project

ADVANCE TECHNOLOGY www.atechindia.com Page 41

Page 42: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

STEP: 4

Make a folder on desktop & give file name.

STEP: 5when you click on the save button, following window opens

ADVANCE TECHNOLOGY www.atechindia.com Page 42

Page 43: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

STEP: 6Select Philips & 89V51RD2xx

STEP: 7Then select NO on the pop-up given below.

ADVANCE TECHNOLOGY www.atechindia.com Page 43

Page 44: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

STEP: 8Then make a New File.

STEP: 9Write or copy your Bluetooth code there & save it with extension .c or .asm

depending on your coding.

STEP: 10Go to target & then source group, right click on there & click on the option

add files to the project.

ADVANCE TECHNOLOGY www.atechindia.com Page 44

Page 45: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

STEP: 11Select your asm or c file which you want to add.

ADVANCE TECHNOLOGY www.atechindia.com Page 45

Page 46: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

STEP: 12Go to the option for target, click on output &tick on create hex file option

STEP: 13Now build target

ADVANCE TECHNOLOGY www.atechindia.com Page 46

Page 47: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

STEP: 14It will show you 0 errors &0 warning on Output Window.

After performing all these steps the chip will be configured through Flash Magic .Let us hand on the steps of chip configuration through Flash Magic………

ADVANCE TECHNOLOGY www.atechindia.com Page 47

Page 48: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

How to use ECE FLASH-MAGIC

ADVANCE TECHNOLOGY www.atechindia.com Page 48

Page 49: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

1. Double Click on the icon present on the desktop.

2. The following window will be popped-up

Press cancel to continue.

3. Configuration

Click options and then click Advanced options…

ADVANCE TECHNOLOGY www.atechindia.com Page 49

Page 50: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

now set the parameters as shown below

4. click on communication and set high speed communication with baud rate 9600.

5. Now click on hardware config and set T1(200)& T2(300).

ADVANCE TECHNOLOGY www.atechindia.com Page 50

Page 51: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

Now select timeouts and set regular time 30 and long timeout 120.Now click ok and main window will appear.

6. After selection of the chip (P89v51RD) , Port (Com1), Osc.Mhz(11.0592) we can see the window as below:

ADVANCE TECHNOLOGY www.atechindia.com Page 51

Page 52: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

Select the blocks to erase, browse for the hex file to be loaded. Press Start

7. Within 5-6 seconds the message will be displayed“FINISHED”.

8. Set the jumper Switches 1, 3, and 5 ON.

OPTIONAL BURNING TOOL

To burn chip 89V51RDRXX through ECE flash it required less.ADVANCE TECHNOLOGY www.atechindia.com Page 52

Page 53: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

Double click on icon as shown below.

Flash window will appear as shown below.

Set baud rate 9600, select working comport of PC to hardware and software communication as shown below.

Now select hex file to burn in chip through browse option as shown below.

ADVANCE TECHNOLOGY www.atechindia.com Page 53

Page 54: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

Now main window will appear as shown below

Click on flash option reset hardware will appear .

ADVANCE TECHNOLOGY www.atechindia.com Page 54

Page 55: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

Now press reset switch on hardware board and flash will burn

with 5-6 Seconds.Again press reset switch on hardware board to run your program or to see

output.Double click on My Bluetooth Places on Desktop and detect all devices in

range it will show lm400.

*How to Connect with lm400 device

Open Hyper Terminal and connect it on the com port as assigned by the Bluetooth device.

ADVANCE TECHNOLOGY www.atechindia.com Page 55

Page 56: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

Set 9600 baud rate, no parity, 1 stop bit .Click on the Settings and then on click on the ASCII setup.

Set the ASCII set up as shown below.

ADVANCE TECHNOLOGY www.atechindia.com Page 56

Page 57: Bluetooth Application Board-8051

BLUETOOTH APPLICATION BOARD WITH 8051

Then press call button.it will connect the hyper terminal

See the results on the hyper terminal. It shows continuous string for example:

“ADVANCE TECHNOLOGY BLUETOOTH DEVELOPMENT KIT”This string is displayed through Bluetooth link.

ADVANCE TECHNOLOGY www.atechindia.com Page 57