Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to receive proper data from MCU Uart with BT Module

Status
Not open for further replies.

Vincent13

Newbie level 3
Joined
Dec 4, 2010
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,314
Its for a project, and I pretty much can handle all parts of a bluetooth module and MCU through UART... With Hyper Terminal, set same baud rate for both chips through serial port of each USB to rs232 converter

AT Commands through hyper terminal for module is easy considering they are giving when buying module ( baud rate, setting password, ect )... Only problem comes when I bought PIC, it did not come with at commands, and I was wondering how to receive readable data
from bluetooth module ( slave ) MCU ( host ) , do I need any particular things to do, or it automatically reads it if set to same baud rate ? Then once it bluetooths back to PC , you can read/open data in any format ? Please help me, I am confused and there is a deadline, any help will be greatly appreciated

Thank you
 

Which compiler are you using?

Before sending/receiving data, you have to configure the module by sending AT command through UART port of MCU.

In C compiler there is Uart( ) function to do this. All you've to do is send Uart("AT Command");

Good luck
 

I am not using a compiler to program Jack... Please inform me steps briefly on what to do to receive/send info through module from MCU

I program module with usb to rs232 converter with uart port, at commands, then i do the same with pic ? What commands do i send ? What compiler do I use for this ?

Let me know how to do it, and once both are programmed and set for same bits per sec and parity, interface them uart and test it ?

Thank you
 

It appears you're not familiar with MCU programming. Here is brief pointer to way you way through...

In compiler (preferably C) like mikroC or CCS PIC C you have to write down program which will be sending/receiving as well as configuring bit rate, parity etc. This program (.hex) has to be burnt on MCU. Once programed it will your BT module to send/receive data. As simple as that.

Hope this helps
 

I appreciate you replying to this thread Jack, but Id need one last thing from you...

I just downloaded mikroC, I shall take a look at it and see how it works, I am not familiar at all with MCU's programming. PIC used is PIC18F2221

Can you please tell me where to find this program needed to write, or write it ? I am sure its quick for an expert and would take me eternity figuring it out properly without mistakes, although u learn from your mistakes, id prefer being sure for this

I hope you can help me,

Thank you
 

You have to do something like this, choose baudrate with is your default BT baudrate:

Code:
char data = 'AT Command';

void main(){
     Soft_UART_Init(PORTB, 1, 2, 9600, 0);
     Soft_UART_Write(data);
     delay_ms(1000);
     Soft_UART_Write(data);
     while(1);
}
 
Thank you sir, Ima try it for tomorrow and keep you updated
 

Which compiler are you using?

Before sending/receiving data, you have to configure the module by sending AT command through UART port of MCU.

In C compiler there is Uart( ) function to do this. All you've to do is send Uart("AT Command");

Good luck

hi jack,
can we send AT commands through USB D+, D-, instead of UART?if so, HOw?

I am using AUBTM-20 , which has D+, D-, (my TX pin got damage.... :( )
Please reply..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top