> > I made a variant of the max7219n library using the spi_master_hw library > and even though the max7219 is said to be not fully SPI compatible it > works fine! I'll do some more testing and maybe commit this library. > Disadvantage is that it requires specific pins (SDO + CK), while the > previous max7219 libraries can use any pins. >
Yes, I figured... One of the temperature sensors I made a lib for wants 5 bit SPI, but works fine with the 8 bit lib (even more incompatible then your case). I guess 5 bit isn't really considered SPI since SPI is 8 bit. If your worried, have a constant in the sample so the user can choose. As for the pins issue, you would use SPI Software instead, or software for the other lib using the pins (such as serial software). > BTW It took me quite some time to understand how to use the ISP > libraries. Comments and explanations with the various procedures are > very scarse, far from sufficient for comfortable start of a beginner > like me. > > Maybe it's too late now, but there is this: http://www.justanotherlanguage.org/content/jallib/tutorials/tutorial_spi_introduction I could have this link added to the SPI lib. The "SPI Modes" section is especially useful. Even if it's working for you, double check the mode your using. It's good to see another SPI lib :) There are likely other libs that use your first method, but should use SPI instead. Not sure if you need SPI software, but here's a code block for it. There are little samples using it. -- setup SPI software alias spi_master_sw_sdi is pin_sdi alias spi_master_sw_sdi_direction is pin_sdi_direction alias spi_master_sw_sdo is pin_sdo alias spi_master_sw_sdo_direction is pin_sdo_direction alias spi_master_sw_sck is pin_sck alias spi_master_sw_sck_direction is pin_sck_direction -- define spi inputs/outputs spi_master_sw_sdi_direction = input -- spi input spi_master_sw_sdo_direction = output -- spi output spi_master_sw_sck_direction = output -- spi clock -- include spi_master_sw spi_master_sw_init(SPI_MODE_11,0) -- init spi, choose mode alias spi_master is spi_master_sw alias spi_master_set_speed is spi_master_sw_set_speed alias spi_master_set_mode is spi_master_sw_set_mode Matt. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/jallib. For more options, visit https://groups.google.com/d/optout.
