Networking and Communications Group Assignment UART I2C Individual Assignment UART bus hello bus

Networking and Communications


Assignment requirements:

Group Assignment
  • Send a message between two projects.
  • Document your work (in a group or individually).
Individual Assignment
  • design, build, and connect wired or wireless node(s) with network or bus addresses.

Learning outcomes:

  • Demonstrate workflows used in network design.
  • Implement and interpret networking protocols and/or communication protocols.

Assessment criteria

  • Linked to the group assignment page.
  • Document your project.
  • Documented what you have learned from implementing networking and/or communication protocols.
  • Explained the programming process/es you used.
  • Outlined problems and how you fixed them.
  • Included design files (or linked to where they are located if you are using a board you have designed and fabricated earlier) and original code.

Group Assignment

UART

  • We have used 2 ATting 1614 boards, and arduino example code with a little editing to light up the LED in a board when pressing button on another board.
  • In this protocol we use the RX/TX pins and to make it function properly we connect RX of the first board to TX of the 2nd board then TX to RX.
  • Codes:
  • UART_recieve.ino UART_send.ino

    I2C

  • Now we tried with the same ATtiny1614 board but I2C protocol.
  • That means we used SDA & SCL pins, the code didn't work because we didn't put a pullup resistors to SDA & SCL pins, once we did that it worked.
  • We used arduino example codes with some edit to do the same function of button and LED on different boards.
  • Codes:
  • i2c_master_writer.ino i2c_slave_receiver.ino


    Individual Assignment

    • Asynchronous wired communication:
    • Is a communication method where there is no global clock between the transmitter and the receiver. Each device has a local clock and it uses it to send or receive data. Example of this wired communication method is UART which stands for Universal Asynchronous Receiver Transmitter. Usually in this communication method the two parties involved agree on a certain baud rate which determines the bit time or the symbol time.

    • Synchronous communication:
    • Synchronous communication uses a special line for a clock which synchronizes the transmission of data with the clock pulses. Examples of this are I2C and SPI.


    UART bus

    • In the assignment with ATtiny1614 I managed to do an UART serial bus, where I write in serial monitor and number and if this number matched a board ID the LED lights up.
    • You can upload the same code on many boards just change the ID number in this line if (data_rcvd == '5').
    • We connect the FTDI RX & TX with the RX and TX of each board in the same order.
    • Code:
    • UART_bus.ino


    hello bus

  • I Also tried with my ATtiny44 with hello.bus.45.c code.
  • I only edited the pins for LED on my board and serial pins I used on my board.
  • We connect the RX and TX of each board together in the same order.
  • You can upload the same code on many boards just change the ID number.
  • Code:
  • hello.bus.45.c.ino