I started a new project for school and i am lost
I don't know how to start, how to conect two module the bluetooth and rfid.
The fist step prior to start a new project is to list the general requirements in the optic of the hardware capabilities. Without deepen to much, don't you see that clearly there is no enough physical UART than required to interface with the modules ? Although being perfectly possible to implement a soft uart, I would not recommend it for you, therefore it's time to select another uC to do that.
Seems there are a lot of lacks on your skills to deal with that, and no one can learn the required stuffs for you. Anyway, specifically answering the question and repeating what has already been said, select another uC than not the PIC16F877, and just connect TX form modules to RX of microcontroller, and vice-versa.i don't know
Seems there are a lot of lacks on your skills to deal with that, and no one can learn the required stuffs for you. Anyway, specifically answering the question and repeating what has already been said, select another uC than not the PIC16F877, and just connect TX form modules to RX of microcontroller, and vice-versa.
Hi,
What are the interfaces of the modules? And what are their signal lines?
Look for the same interface(s) on the microcontroller and connect the signal lines to the modules. Don´t forget to connect GND to ALL devices.
Take a pencil and a sheet of paper and draw the modules, the microcontroller and their connections.
Klaus
Hi,
I don´t have the time to go to through the datasheets and find out what interfaces and connections to use. It´s your job.
Please answer the questions of post#7.
Klaus
Both using UART. Anyway, I'm also don't understand how we can help.
Considering that you have no knowledge in almost everything you asked here ( firmware, hardware, etc... ), do you really expect to achieve something ? We're repeatedly telling you that no one will do this job for you, but if you have specific question in specific topics, we'll be glad to help you.
I have difficulties to hear a clear question, I can just guess that the problem is how to connect two modules with UART interfaces to a PIC16F877A that has only one UART port?
A simple way would be to switch to a more recent PIC type with two UARTs. Presuming you are tied to PIC16F877A, implementing a software UART would be another option. It has serious restrictions, e.g. you can't run interrupts (at least not interrupt functions consuming significant processing time) while sending or receiving through software UART.
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 #define 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; void main() { ADCON1=7; INTCON.GIE=1; INTCON.T0IE=1; INTCON.T0IF=0; TRISD = 0; TRISA = 255; TRISC = 0; TRISD=0; UART1_Init(9600); Lcd_Init(); Lcd_Cmd(_LCD_CLEAR); Lcd_Cmd(_LCD_CURSOR_OFF); Lcd_out(2,1, "???"); Delay_ms(100); while(1) { if(doora.b0==1) { UART1_write(48); UART1_write(49); //0x01 + 0x0B + 0x03 + 0x01 + 0x00 + 0xC6 + 0x49 + 0x6F + 0xFF + 0x93 + 0x31 UART1_write(48); UART1_write(66); UART1_write(48); UART1_write(51); UART1_write(48); UART1_write(49); UART1_write(48); UART1_write(48); UART1_write(99); UART1_write(54); UART1_write(52); UART1_write(57); UART1_write(54); UART1_write(102); UART1_write(102); UART1_write(102); UART1_write(57); UART1_write(51); UART1_write(51); UART1_write(49); delay_ms(2000); }
Your code don't reflect anywhere what was received on serial port. Actually, there isn't any routine to get incoming bytes on the UART rx for the microcontroller; I would expect something like "UART1_read()" either on interrupt vector or in the while(1) loop.
what should i put to controle the swich and the UART rx,tx
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?