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.
Photo

Shift register problems


  • Please log in to reply
22 replies to this topic

#21 V64

V64

    Member

  • Members
  • PipPip
  • 20 posts

Posted 29 December 2012 - 02:16 PM

Mario,

 

I am in a learn/evaluate phase and this sort of 'glitch' tells me I should look for alternatives toys to play with!

 

I have problems with other examples/tutorials which either simply either dont work/compile/run and consume memory resources until they fail!

 

Anyway - thank-you for your time and interest - but one final comment - the issue looks to me like a timing problem on the SS edge used to trigger the transfer of data from the Shift register to the Data store for display (but I do not have the tools to investigate such problems).

 

So, what is the difference between the SPI class - which works fine - and the Toolbox clases which do not.

 

Thanks again

 

David



#22 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 29 December 2012 - 03:25 PM

David, I was answering both to NooM and to you on the same post, so don't be scared about some term.

 

I don't understand what's your target, in general, but using a Netduino is quite simple. The new born, Netduino Plus 2, is much more powerful than the old versions, but it has clearly some problem. If you wish to take practice I recommend the old one (standard or Plus). I'm using the Plus since over one year and it works pretty well.

You should only bear in mind two-three things:

  • the ram available is millions of times less than a normal pc, thus you must use it carefully.
  • the speed is limited by the huge amount of work which has to do the cpu: it seems absurd, but if you were trying the same tasks in C++, you would get the same result.
  • you are running managed code: even on a pc you would have hard time for fine-tuning timings and similar low-level stuffs.

I believe it's an instructive playground, which helps any programmer to deal better with the machine. I am not a computer scientists, but I think that all that "waste of resources" on the today's pcs bring us to lose the perception of the real low-level problems.

 

SPI and other libraries.

The SPI is the most primitive object exposed by the framework, which wraps the real physical logic. You could see the "SPI" object as it were a "Socket": instead of using the Ethernet/IP, it uses a very simple shift-register for the data exchange. Really, I can't think to a simpler way for exchanging data.

Many users created their own "helpers" around the already exposed APIs. The NetMF Toolbox is perhaps the most famous, although I would not recommend to overload a small experimental program with ton of classes. Instead, you should deal with very easy steps, without any "foreign" elaboration. Of course, when you'll be experienced enough, the helpers/libraries are welcome.

 

It is to you decide on how to move. I believe here are many users ready for helping new friends. So, just ask what it's unclear or is not working.

Cheers


Biggest fault of Netduino? It runs by electricity.

#23 V64

V64

    Member

  • Members
  • PipPip
  • 20 posts

Posted 29 December 2012 - 05:34 PM

Mario,

 

My target is to learn (and evaluate) - so I get a piece of hardware (e.g. the 7-segment plus a shift register) and I explore the ways that it can be driven and therefore the libraries/helpers that I can use, and the solutions that are available.

 

I am especially looking at Threads/Interlocks (my test case worked but consumed memory, and eventually failed) and Interrupts and Callbacks.

 

I feel I need to get a good understanding of the C# architecture, I2c and SPI, softserial and inter Netduino:Arduino communication.

 

For me this an essential step  before I even start to think about a project! So I am using both an Arduino and a basic Netduino, since the iDE and Debug facilities are important.  I have also used Apples OSX Xcode as an IDE for the Arduino, but there were too many problems for me.

 

So in this case my focus is on using the toolbox helper - the display is one way to do it. It may well be 'overload', but that does not matter.

 

As an aside, the first program I wrote was an Algol60 compiler for a machine with less than 512KBytes of memory, so I am in full agreement with your comments abouts todays use of resources. Hardware I have always taken for granted - so this experience is proving to be an education.

 

It has been good to talk with you

 

David






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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.