| Electronic Components Datasheet Search |
|
DFR0627 Datasheet(PDF) 8 Page - DFROBOT |
|
|
|||||||||||||||||||||||||||||
DFR0627 Datasheet(HTML) 8 Page - DFROBOT |
|
8 / 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 8/16 Sample Code 1 Write a demo to allow UART1 and UART2 to realize the function of self-transmitting and self-receiving. Connect pinT of UART1 to its pinR, UART2 TX to its RX. UART1 transmit "hello,Serial1", UART2 transmit "123", then receive their own data and print them out. /*! * @file dataTxAndRx.ino * @brief Receive and transmit data via UART. Read the data sent by TX pin via pin RX. * @n Experiment phenomenon: connect the TX to RX in Sub UART1 and UART2. Read the data sent by Sub UART and print it out. * * @copyright Copyright (c) 2010 DFRobot Co.Ltd (https://www.dfrobot.com) * @licence The MIT License (MIT) * @author [Arya](xue.peng@dfrobot.com) * @version V1.0 * @date 2019-07-28 * @get from https://www.dfrobot.com * @url https://github.com/DFRobot/DFRobot_IICSerial */ #include <DFRobot_IICSerial.h> /*DFRobot_IICSerial Constructor *Parameter&wire Wire *Parameter subUartChannel sub UART channel, for selecting to operate UART1 or UART2 *@n Available parameter: SUBUART_CHANNEL_1 SUBUART_CHANNEL_2 UART1 UART2 *Parameter IA1 corresponds with IA1 Level(0 or 1) of DIP switch on the module, and is used for configuring * @n the IIC address of the 6th bit value(default: 1). *Parameter IA0 corresponds with IA0 Level(0 or 1) of DIP switch on the module, and is used for configuring * @n IIC address of the 5th bit value(default: 1). * IIC address configuration: * 7 6 5 4 3 2 1 0 * 0 IA1 IA0 1 0 C1 C0 0/1 *@n IIC address only has 7 bits, while there are 8 bits for one byte, so the extra one bit will be filled as 0. *@n The 6th bit corresponds with IA1 Level of DIP switch, can be configured manually. *@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 |
|
|
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 |