| Electronic Components Datasheet Search |
|
DFR0627 Datasheet(PDF) 13 Page - DFROBOT |
|
|
|||||||||||||||||||||||||||||
DFR0627 Datasheet(HTML) 13 Page - DFROBOT |
|
13 / 16 page ![]() 2023/10/12 10:51 Gravity: IIC to dual UART module Wiki - DFRobot https://wiki.dfrobot.com/Gravity: IIC to Dual UART Module SKU: DFR0627 13/16 *@n The 5th bit corresponds with IA0 Level of DIP switch, can be configured manually. *@n The 4th and 3rd bits are fixed, value 1 and 0 respectively *@n The values of the 2nd and 1st bits are the sub UART channels, 00 for sub UART 1, 01 for sub UART 2. *@n The 0 bit represents the operation object: 0 for register, 1 for FIFO cache. */ DFRobot_IICSerial iicSerial2(Wire, /*subUartChannel =*/SUBUART_CHANNEL_2, /*IA1 = */1,/*IA0 = */1);//Construct Sub UART2 char rx_buffer[256];//Define a receive buffer to store the data received by UART2 void setup() { Serial.begin(115200); /*begin Init function, set band rate according to the selected crystal frequency. begin(long unsigned baud) Call the function, set sub UART band rate. default setting->Band rate: baud, data format :IIC_SERIAL_8N1, 8 bits data, no check mode, 1 bit stop bit. begin(long unsigned baud, uint8_t format) Use the function to set band rate and data format: Parameter supported baud: 2400, 4800, 57600, 7200, 9600, 14400, 19200, 28800, 38400, 76800, 115200, 153600, 230400, 460800, 307200, 921600 Parameter available format: IIC_SERIAL_8N1 IIC_SERIAL_8N2 IIC_SERIAL_8Z1 IIC_SERIAL_8Z2 IIC_SERIAL_8O1 IIC_SERIAL_8O2 IIC_SERIAL_8E1 IIC_SERIAL_8E2 IIC_SERIAL_8F1 IIC_SERIAL_8F2 8 represents the number of data bit, N for no parity, Z for 0 parity, O for Odd parity, E for Even parity, F for 1 parity, 1 or 2 for the number of stop bit. Default IIC_SERIAL_8N1 */ iicSerial2.begin(/*baud = */115200);/*UART2 init*/ //iicSerial2.begin(/*baud = */115200, /*format = */IIC_SERIAL_8N1); Serial.println("\n+-----------------------------------------------------+"); Serial.println("| connected UART2's TX pin to RX pin. |"); Serial.println("| Analysis string and eliminate a char of a string. |"); Serial.println("| Original string: ABCDEFASFGHJUAAAEEB |"); Serial.println("| Eliminate char: A |"); Serial.println("| Original string: BCDEFSFGHJUEEB |"); Serial.println("| Print the parsed string. |"); Serial.println("+-----------------------------------------------------+"); Serial.println("Please Send to the string by UART2's TX."); Serial.println("UART2 send a string: ABCDEFASFGHJUAAAEEB"); iicSerial2.println("ABCDEFASFGHJUAAAEEB");//UART2 transmit string "ABCDEFASFGHJUAAAEEB" } |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |