Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

remotewizard's Content

There have been 31 items by remotewizard (Search limited from 27-April 23)


By content type

See this member's


Sort by                Order  

#52442 Embarassing SPI question (re: Netduino Helper Max72197221.cs )

Posted by remotewizard on 29 August 2013 - 12:06 PM in General Discussion

I like simple!  And VB isn't simple at all - just different. 

 

I appreciate the additional information.  I'll give it a try tonight.

 

Thanks again!




#52436 Embarassing SPI question (re: Netduino Helper Max72197221.cs )

Posted by remotewizard on 28 August 2013 - 10:18 PM in General Discussion

I should probably ask if you could share the code for MultiSPI4SevenSegment. 




#52431 Embarassing SPI question (re: Netduino Helper Max72197221.cs )

Posted by remotewizard on 28 August 2013 - 07:29 PM in General Discussion

Very nice!  I'll try this as soon as I get home from work tonight!  I'll keep you posted.

 

I note the Thread.Sleep in your write method - perhaps my problem was a timing issue?

 

Thanks to both of you!




#52418 Embarassing SPI question (re: Netduino Helper Max72197221.cs )

Posted by remotewizard on 28 August 2013 - 05:59 PM in General Discussion

Same thing: when I tried sending live data twice, only the first module responded.  I'm reletively certain it's not a hardware issue, as I was able to get all leds on all modules to light using my Bus Pirate.

 

The two transfers is a good idea; I'll give that a try. 

 

Do you think the new enhanced SPI (which permits transferes other lengths than 8 or 16 bits) might help?

 

Thank you as always, my friend, for taking the time to help.




#52412 Embarassing SPI question (re: Netduino Helper Max72197221.cs )

Posted by remotewizard on 28 August 2013 - 11:49 AM in General Discussion

I thought so too, and actually tried it that way first.  It didn't work either.  And researching the 7219 online lead to my trying it the other way.

 

Such a simple thing, and so frustrating!




#52399 Embarassing SPI question (re: Netduino Helper Max72197221.cs )

Posted by remotewizard on 27 August 2013 - 10:38 PM in General Discussion

I have one of the typical cheapo four-module 7219 LED matrices (e.g. four panels of 8x8 each, with power, ground, clock and cs daisy-chained; each module after the first gets it's DIN from the previous DOUT).  I downloaded the current Max72197221.cs from Netduino Helpers, and was able to send letters and patterns to the first module.  So far ,so good.

 

However, according to the 7219 datasheet, I should be able to address each of the subsequent modules by sending a No-Op after each row of data (the four 7219 chips acting as a shift register) for each module I want to move to the right.  But sending what I think is the right value to the matrix doesn't work.

 

For example, I changed the original Max72197221.cs code to define SpiBuffer as ushort[2], and modified the Write subroutine as follows:

 

protected void Write(byte register, byte value) {

SpiBuffer[0] = register;

SpiBuffer[0] <<= 8;

SpiBuffer[0] |= value;

 

SpiBuffer[1] = (byte)RegisterAddressMap.NoOp;

SpiBuffer[1] <<= 8;

SpiBuffer[1] |= 0;

 

Spi.Write(SpiBuffer);

}

 

But the display doesn't - well, display.  It also doesn't work when defining SpiBuffer[1] simply as 0 (without all the bit-shifting nonsense).  Can anyone help me spot the flaw in my logic?





home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.