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.

sweetlilmre

Member Since 26 Aug 2010
Offline Last Active Aug 14 2014 02:14 PM
-----

Topics I've Started

Porting eLua to the NetDuino

10 December 2010 - 11:18 AM

Hi,

I've been looking into porting eLua to the Netduino.
Currently eLua supports the Netduino chip (at91sam7x512) but not the board i.e. I can build and flash the firmware but the device does not seem to boot.
Diagnosing this without JTAG is going to be ... very interesting.

I was wondering if anyone here with low level board support skills would be willing to have a look into the port and report back any findings / insight?

Lua is a wonderfully easy language to teach to kids and I'd like to expand the reach and capabilities of the Netduino through this.
(after a sucessful Lua port, I'd probably look into PyMite next).

I look forward to your responses.
-(e)

EDIT:

Turns out that eLua DOES boot. I just had the incorrect serial port connected (UART2 i.e. pins D2&D3 are required, not D0 and D1).
This means that the default compile works for the Netduino, exciting stuff! I will post progress in this thread.

PS2 Keyboard timing woes

10 November 2010 - 12:15 PM

Hi,

I ported over the Arduino PS2 keyboard driver but unfortunately I cannot seem to read the PS2 data line fast enough during the clock interrupt.
The same pinout etc. was tested and working on an Arduino so it seems to be an interop speed issue.

Has anyone else managed to get this working?

Thanks
-(e)

Talking to 74HC574 chips

22 September 2010 - 09:43 AM

Hi,

Here is a nice little R.E. project I did over the weekend on some old electronics: My Blog
There is so much old stuff just getting tossed into the dump which is a shame as these bits contain a wealth of commercial grade electronics.

-(e)

BitBanger Driver

05 September 2010 - 05:07 PM

Hi,


UPDATE: this post has been updated with a newer version and firmware: 11/29/2010. This newer version provides SoftSPI like capabilities.

In my quest to make my HT1632 display useable I have developed a generic bit banger driver.

The attached archive unzips into the "MicroFrameworkPK_v4_1\Solutions\Netduino" dir.
If you want to build this yourselves you will have to build the managed solution and generate the client assemblies and then build the firmware as usual.

The speed increase in amazing when driving the HT1632 and I know that variable SPI is around the corner, but I thought this might be useful in a more generic context (the code should be device neutral).

The bit banger is constructed with a configuration class that describes two pins, one clock and one data.
Ownership of the pins then belongs to the BitBanger class.

public class Config
{
public Config( Cpu.Pin clockPin,
             		bool clockEdgeRising,
             		Cpu.Pin dataPin,
             		Cpu.Pin latchPin,
             		bool latchActiveState )
}

BitBang.Config config = new BitBang.Config( clkPin, true, dataPin );
// set data & clock pin modes
BitBang bb = new BitBang( config );


Additionally the latchPin and latchActiveState Config members allow for additional flexible latching behaviour.

public enum LatchBehaviour
{
	PerTransfer,
	Per8Bits,
	Per16Bits,
	Per32Bits,
	Never
}

LatchBehaviour is passed to the block blitting function and will toggle a latch line (or CS possibly) in a certain manner.
This is very useful for writing to shift registers in a continuous mode.


The BitBang class interface has some basic functionality:

These two methods bang out a stream of bytes, with each byte written from the MSb (bigEndian) or LSb and with optional latch behaviour.

public void Write( byte[] writeBuffer, int writeOffset, int writeCount, bool bigEndian)
public void Write( byte[] writeBuffer, int writeOffset, int writeCount, bool bigEndian, LatchBehaviour latchBehaviour )


And these two methods bang out up to 32 bits with the same endian functionality as above.

public void Write32( UInt32 data, byte numBits, bool bigEndian )
public void Write32AndLatch( UInt32 data, byte numBits, bool bigEndian )


I have attached 2 files containing the compiled firmare (tinyclr.hex.zip) and the source code (bitbang.zip).
Included in the source code is the compiled client assembly which you will find under the MicroFrameworkPK_v4_1\Solutions\Netduino\ManagedCode\SecretLabs_NETMF_Hardware\bin\Release dir.
You will need to reference this assembly or replace the one provided with the NetDuino SDK in order to use the BitBang class.

:D :D :D

Hope this is interesting / useful
-(e)

HT1632 interface (alpha)

01 September 2010 - 09:53 AM

Hi,

Attached is some code to drive the HT1632 LED Matrix chip as found in the Sure Electronics DE-DP13212 and similar boards (Sure Electronics).
The code is horribly slow at the moment as a raw bit-bang approach is used to communicate with the HT1632 (and I am sure my horribly un-optimsed code does not help :))
I will migrate this to SPI once variable SPI is available. At any rate here it is to look at.

This code was ported from Miles Burton's Arduino code and is released under the same GPL license.

Any pointers on optimisation would be great as C# on an embedded device is very new to me!

Connection is 5 wires:
Power and ground to 5V and GND pins.
ChipSelect to digital pin 4
Clock to digital pin 13
Data (WR) to digital pin 12

Hope this helps someone. I will attempt to optimise this to make it useful and to support the 2416 boards as well.
-(e)

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.