Advertisement

SAA1064

Not rated 10,602

#I²C #SAA1064 #address selection #IC #bus communication #digital logic #microcontroller #hardware interface #embedded systems #electronics
SAA1064
SAA1064

Description: Each integrated circuit (IC) on the I²C bus requires a unique address. Typically, these ICs can choose from a range of 2 to 8 possible addresses, enabling multiple chips of the same type to coexist on a single bus. The SAA1064 can select from four different addresses by applying a specific voltage to pin 1 (ADR). However, on the current module, the address pin is hardwired to ground. Consequently, changing the address necessitates some cutting and rewiring. This modification is only necessary when multiple modules are used on the same I²C bus. The track located just above C02 (the small brown component in the upper right corner) connects the ADR pin of the SAA1064 to ground (the right side of C02). By cutting this track and connecting pin 1 of the SAA1064 directly to Vcc, address $76 can be selected instead of $70. To select any of the other addresses, two resistors must be added to generate the appropriate voltage on pin 1. A voltage of approximately 1.9V will select address $72, while a voltage of about 3.1V will select address $74.

The accompanying diagram illustrates a complete I²C message. This message consists of an address byte followed by a total of six data bytes. The diagram specifically depicts a write message. Although it is possible to read from the device, this only indicates whether it has been powered up, which is not particularly useful; thus, the focus will remain on write mode. The address byte is primarily fixed, with only two bits varying based on the voltage at the ADR pin. In this module, the ADR pin is hardwired to ground, resulting in a response to address $70. The first data byte in the sequence is always a sub-address, which determines the subsequent data byte to be sent. Generally, this sub-address byte is $00, indicating that the next data byte is the control byte. Other sub-addresses can be utilized to directly access the desired data byte. In this case, the sub-address must be $00 as the control byte follows.

The control byte governs the chip's behavior, allowing the selection between static or dynamic modes, as well as controlling whether the display(s) on both ports should be activated. Additionally, it enables the segment test mode, where all segments can be switched on. Most notably, it allows for the control of segment current, which is a valuable feature. The segment current can be selected from 3 to 21mA in increments of 3mA by setting the appropriate bits. For this specific module, the least significant bits must be set, while bit b3 must be cleared. Bits 4 to 6 are used to adjust the display brightness.

The following four bytes represent bit masks for each of the four digits of the module. It is important to note that the segments on this module (and thus the diagram at the beginning of this document) are arranged differently. To replicate projects utilizing this module without modifications, it is essential to rearrange the segments accordingly. Furthermore, it is crucial to clarify that Display number 1 is the rightmost digit. Consequently, the digits on the display are transmitted through the I²C bus in reverse order.

This detailed explanation covers the address selection, control byte functionality, and data transmission specifics for the SAA1064 IC in the context of its operation on the I²C bus. Understanding these elements is vital for effective integration and manipulation of the module in electronic projects.Every IC on the I ²C bus requires a unique address. Usually such ICs can select from a set of 2 to 8 possible addresses to allow multiple chips of the same type on one bus. The SAA1064 can select from 4 different addresses by applying a specific voltage on pin 1 (ADR). Unfortunately the address pin on my module is hard wired to ground. Therefore changing the address of it requires some cutting and rewiring. Fortunately that is only required when more than one module is to be used on the same I ²C bus. The track just above C02 (the small brown part in the upper right hand corner) is the track that connects the ADR pin of the SAA1064 to ground (right side of C02). By cutting this track and connecting pin 1 of the SAA1064 directly to the Vcc you can simply select address $76 instead of $70.

Selecting any of the other address involves adding 2 resistors to create the appropriate voltage on pin 1. A voltage of about 1. 9V will select addres $72, while a voltage about 3. 1V will select address $74. The diagram above shows a complete I ²C message. Such a message consists of an address byte and a total of 6 data bytes. The diagram only shows a write message. You can read from the device, but that will only tell you whether it was just powered up. Thus not very useful, so I will restrict myself to the write mode only. The address byte is mainly fixed, only 2 bits may differ depending on the voltage on the ADR pin. On my module the ADR pin is hard wired to ground, which makes it respond to address $70. The first data byte in the string is always a sub-address. It selects what data byte is to be send next. In most cases this sub-address byte is $00, which means that the next data byte is the control byte. By using other sub-addresses you can skip right to the data byte you want to change. In this example the sub-address must be $00 because we continue with sending the control byte next. The control byte controls the behaviour of the chip. It selects between static or dynamic mode, and whether the display(s) on both ports should be on or not.

It also allows you to switch on all segments in the segment test mode. But most importantly it will allow you to control the segment current. This is a nice property! You may select a segment current from 3 to 21mA in steps of 3mA by setting the appropriate bits. In my case the least significant bits have to be set, b3 must be cleared. Bits 4 to 6 will set the display brightness. The next 4 bytes are easily explained. They are simply bit masks for each of the 4 digits of the module. But remember, the segments on my module (and therefore the diagram at the beginning of this page) are mixed up a little. If you want to copy my projects that use this module without modification, you will also have to mix up the segments in the same way.

By the way: Did I mention that Display number 1 is the right most digit I don`t think I did. So I`d better tell you now. Display 1 is the right most digit, which means that the digits on the display are sent through the I ²C bus in reverse order.

Related Circuits