An AVR microcontroller has to be used for digital tasks, not analog. We have very accurate digital timing that is measured and this timing must be converted to analog time values. One way is to use a shift register. The data is placed into the logic low portion of the shift register that will shift it over to the logic high portion of the shift register.
Shift registers use shift register driver chips that are set up on a test board and connected to the processor. Data is fed into the device. The driver chips are set up to drive the logic low portion of the shift register at the same time as the driver chip shifts it over to the logic high portion of the shift register.
Most shift registers will work using two buffers. The buffer is set up so that the same entry and exit register are read and rewritten several times. Each step or increment is marked by writing a bit to the correct bit on the shift register.
Most programmable shift registers have one address mode and one data mode. Some of the newer shift registers do not require the use of an external address or data line.
In the data line mode the data lines are connected directly to the processor. The clock pin is connected to ground and the address line is connected to the positive power rail.
The mode with two data lines is similar but uses an additional address line. The data lines are connected to ground and the address lines are connected to the negative power rails. This adds some complexity to the programming and when we say more complexity we mean a lot more. More than you may think.
If the AVR microcontroller is on a board that includes a separate chip formultiple-address lines then you have a real headache on your hands. There are multiple chip programs that are designed to make programming shift registers a breeze.
Most of these shift registers come with a built in logic analyzer. The analyzer is the second to last chip that goes on the shift register. It’s the last chip on the assembly, so you know what you’re getting.
Most chips on the shift register are fairly easy to get started with. If you want to do some serious programming, you’ll have to buy a software program that is appropriate for your chip type. You can usually find this on the Internet.
It’s best to look at an AVR microcontroller book to get some guidance as to which program you should use. A book that has the table of contents in the front of the book will help you get through it easily. It will also give you the basic idea about how everything works.
To get a better understanding of what the shift registers are for you might want to look at other chip types such as a serial processor, analog processor or programmable logic chip. If you do, you’ll learn the ins and outs of the shift registers. It will give you a good foundation for doing more advanced programming.
When you have your program going, take a look at the datasheet and get a quick view of the simple information that is needed to get started. There are usually two kinds of registers on a shift register, address and data. They both work the same and the two use the same logic.