Tuesday, October 30, 2012

AVR Atmega 74HC595 library 01

74HC595 is a 8-bit serial-in, serial or parallel-out shift register.



74HC595 ics are usefull to expand output ports of a micro.
This library implements a way to setup 74HC595 pins.

This library is inspired on bildr 74hc595 library for arduino http://bildr.org/2011/08/74hc595-breakout-arduino/.
Setup parameters in l74hc595.h
This library was developed on Eclipse, built with avr-gcc on Atmega8 @ 1MHz.



Code


Notes
  • read risk disclaimer
  • excuse my bad english

4 comments:

  1. Hi David! thanks for you library! It was really helpful, but I've a little questions, in this par #define l74hc595_setregon(regindex) l74hc595_setreg(regindex, 1); How call it? What type of Technic is it? And congratulations for this! Best Wishes from México!

    ReplyDelete
    Replies
    1. Hello, thank you for your feedback!. You can use that define as a function, passing the register you what to turn on as a uint16_t variable. Something like this should do the job l74hc595_setregon(regindex). As example l74hc595_setregon(1) will turn on register output pin 2. I'm sorry but i do not understaind what you mean with Technic.

      Delete
    2. Sorry for my bad English!, I try to say what type of method is it, But now I understood and I start to read a good sources for code C special for macros and define concept. Thanks again! Best regards!!

      Delete