Attiny25 Serial Port

Posted on by admin
Attiny25 Serial Port Rating: 8,8/10 3878 reviews

A virtual serial port is an emulation of the standard serial port. This port is created by software which enable extra serial ports in an operating system without additional hardware installation (such as expansion cards, etc.). It is possible to create a large number of virtual serial ports in a PC. The Digispark supports all features found in the IDE with the exception of the serial monitor and the burn bootloader functionality. Many existing libraries will not work with the Digispark: For I2C devices check out the TinyWireM library, which makes it super simple to port an I2C based device library over to use with the Digispark. The sound level meter board is truly plug-and-play - so I will assume the user has an Arduino Uno board to record the dBA values. In the code below, I will also be transmitting the values via Bluetooth, but if the user doesn't have a receiver, the code will work and print the sound pressure level readings to the serial port.

Attiny serial ports

Did you use the pull-up resistor for both, the SDA and SCL? They are important for the I2C protocol. FYI: The logic '0' on the either bus is set by device driving actual '0' on the pin.

Attiny25 Serial Port Orange

On the other hand, the logic '1' is set on the bus by putting the device pin in the high impedance, in case on the ATtiny, it means setting pin into INPUT direction. When the both, the master and slave set pins to hiZ, the pull-up resistor pulls the voltage on the bus to value representing logic '1'. This solution allows avoiding contention on bi-directional bus (one device driving '1' and second driving '0') than can lead to short-circuit and damaging devices. So, if you don't use the pull-up resistor, the bus will be left floating whenever logic '1' is driven and it will lead to protocol errors.