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

BitBanger Driver


  • Please log in to reply
39 replies to this topic

#21 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 19 October 2010 - 07:08 AM

Great, sweetlilmre. Let me create an integration plan (figure out how best to get this integrated). It may take a bit to sort out the details, but we'll get it integrated. I'd love to get it into v4.1.1, but v4.1.2 beta is my backup plan :) This is a really awesome contribution! Chris

#22 hookedup

hookedup

    Member

  • Members
  • PipPip
  • 20 posts
  • LocationFlorida - USA

Posted 19 October 2010 - 11:00 PM

Hookedup: if you want to flash this you will need to reflash your bootloader (tinybooterdecompressor.bin is included) and then flash the hex files included.
-(e)


Thank you very much for providing the files and for contributing such a great updates. I am super busy for a couple of days but will work to do the updates and test usage asap.

I enjoy working with netduino and have high hopes that using your code will get me over the minor bump in the road to doing really cool stuff with the netduino :)

#23 sweetlilmre

sweetlilmre

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts

Posted 20 October 2010 - 06:12 PM

Hi,

Chris:

I have taken the liberty of moving the code into the SecretLabs.NETMF.Hardware namespace.

Attached is a zip that should be extracted into the Solutions\Netduino\ folder and will:

  • update the Solutions\Netduino\DeviceCode\SecretLabs_NETMF_Hardware folder with the bitbang code
  • add the managed project source code into the C:\MicroFrameworkPK_v4_1\Solutions\Netduino\ManagedCode\SecretLabs_NETMF_Hardware folder
I discovered that the "SecretLabs.NETMF.Hardware.featureproj" file was pointing to the debug assembly, so I changed that to point to release and made the reference endian independent. You will obviously need to compile the managed code in release mode before building the firmware in order to generate this reference.

I tested the firmware against the LED matrix code and it all seems to work nicely.


Hookedup:

I hope this works for you, let me know how it goes.

Thanks
-(e)

Attached Files



#24 hookedup

hookedup

    Member

  • Members
  • PipPip
  • 20 posts
  • LocationFlorida - USA

Posted 27 October 2010 - 03:06 PM

Thanks again for providing the files to load directly. I was able to erase and flash the bootloader (once moved to XP) and reload the firmware, which is a major step forward. Still working out some odd errors in loading the hex files and when using the bit banger runtime - may be missing something still. I will provide more details on the errors when I into it again unless it becomes part of the base firmware by the time I get back into it, in which case I'll report back on progress using that. Thanks for all the help from you and the netduino team in providing a solid base to work from.

#25 Crispin

Crispin

    Advanced Member

  • Members
  • PipPipPip
  • 65 posts
  • LocationLondon, England, Earth

Posted 01 November 2010 - 08:59 AM

Folks, After much frustration I've found out (think) my LCD won't work because of how I am talking to it. It would appear this is my solution. Any chance of a nice step by step walkthrough on how to get this working? I've flashed the new bootloader and flashed the firmware with sweetlilmre copy but am non the wiser as to how to proceed. after much searching on my machine for anything that resembled "C:\MicroFrameworkPK_v4_1\Solutions\Netduino\ManagedCode" I worked out I actually had to install the Porting kit from MS. From there, I am still lost. Any help for a total noob at this? Any hint as to when it would be in the native firmware, even as an alpha? I would be happy to use that. Thanks CP
--
Take a seat, I'll be right with you.

#26 sweetlilmre

sweetlilmre

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts

Posted 01 November 2010 - 10:16 AM

Folks,

After much frustration I've found out (think) my LCD won't work because of how I am talking to it. It would appear this is my solution.

Any chance of a nice step by step walkthrough on how to get this working? I've flashed the new bootloader and flashed the firmware with sweetlilmre copy but am non the wiser as to how to proceed.
after much searching on my machine for anything that resembled "C:\MicroFrameworkPK_v4_1\Solutions\Netduino\ManagedCode" I worked out I actually had to install the Porting kit from MS. From there, I am still lost.

Any help for a total noob at this? Any hint as to when it would be in the native firmware, even as an alpha? I would be happy to use that.


Thanks
CP


Hi,

If you have flashed the firmware I provided then in the zip file should be an assembly that you can reference.
Once you've referenced the assembly in your project you can call the bitbanger driver (you don't need the porting kit etc. unless you want to compile your own firmware).

You are looking for "NetDuino.Hardware.BitBang.dll" in the zip file. Reference that and then instantiate the class and call appropriate methods to setup the gpios etc.
-(e)

#27 Crispin

Crispin

    Advanced Member

  • Members
  • PipPipPip
  • 65 posts
  • LocationLondon, England, Earth

Posted 01 November 2010 - 08:33 PM

Ahh, thanks. I'll try that then. If it works I shall name my first born sweetlilmre Watch this space :)
--
Take a seat, I'll be right with you.

#28 Crispin

Crispin

    Advanced Member

  • Members
  • PipPipPip
  • 65 posts
  • LocationLondon, England, Earth

Posted 05 November 2010 - 10:22 PM

Ahh, thanks. I'll try that then.

If it works I shall name my first born sweetlilmre

Watch this space :)



No Joy :(

I can add the code in and that all seems well but I cannot get the LCD to play nice. It's all a bit beyond me on how to talk LCD..

Cheers,
Crispin
--
Take a seat, I'll be right with you.

#29 sweetlilmre

sweetlilmre

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts

Posted 10 November 2010 - 07:54 PM

No Joy :(

I can add the code in and that all seems well but I cannot get the LCD to play nice. It's all a bit beyond me on how to talk LCD..

Cheers,
Crispin


Hi,

Do you have any specifics on the issue? What LCD, wiring etc?
Maybe we can figure this out.
-(e)

#30 RvBCrS

RvBCrS

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts
  • LocationZutphen, Netherlands

Posted 25 November 2010 - 01:05 PM

Hi,

Do you have any specifics on the issue? What LCD, wiring etc?
Maybe we can figure this out.
-(e)


Hi Sweetlilmre,

If you have the time can you please explain to me how I can get this bitbanger driver to work with the Dot Matrices from Sure Electronics? or can you update your example of the Led Matrices with this driver?

Thanks,

Ramon
Blog: Morrison Blog
Twitter: @rvbcrs

#31 sweetlilmre

sweetlilmre

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts

Posted 26 November 2010 - 08:09 AM

Hi Sweetlilmre,

If you have the time can you please explain to me how I can get this bitbanger driver to work with the Dot Matrices from Sure Electronics? or can you update your example of the Led Matrices with this driver?

Thanks,

Ramon


Hi Ramon,

I will try to get to this as soon as possible, unfortunately life is a little crazy at the moment :)
-(e)

#32 sweetlilmre

sweetlilmre

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts

Posted 26 November 2010 - 08:16 AM

Hi Ramon, I just remembered that I had made this change already. Here is a totally untested code drop of the matrix code built against the BitBang class. You are totally on your own with this: I am releasing purely for you to look at and am not going to support it in any way :) I will update the matrix thread when I release it properly. -(e)

Attached Files



#33 sweetlilmre

sweetlilmre

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts

Posted 30 November 2010 - 08:53 PM

I have updated the first post with a much more rounded driver and related firmware. To test the efficiency of this new firmware I have put the Matrix code through its paces and it performs well. Hopefully soon I will try this out on some LCD displays to test the latching effect. Also I have found some interesting bugs in the matrix code and will be updating it as soon as possible. Thanks -(e)

#34 Hauk

Hauk

    Member

  • Members
  • PipPip
  • 18 posts
  • LocationSan Diego, CA

Posted 16 December 2010 - 11:18 PM

Hey there! Any update on when this will show up in the firmware? It seems the firmware dev has been dead for a while. A public repository would be excellent.

#35 timothyp

timothyp

    Member

  • Members
  • PipPip
  • 24 posts

Posted 23 December 2010 - 10:22 AM

Does this BitBanger project have a home page and more information ?

#36 Jan Olof

Jan Olof

    Advanced Member

  • Members
  • PipPipPip
  • 41 posts
  • LocationSweden

Posted 05 January 2011 - 09:16 PM

Hi Does the Bitbanger need an external clock signal to work (that is what i beleive)? How is the performans, how long from a clock until output, how fast can the next output bee, and so on ? Does it sit in a tight loop doing the work, or is it interupt driven? I have seen an issue with Interupt latency but perhaps that is only for managed code. Would it be possible to have it internally clocked, something like the OutputCompare, were you have an array of delays and the bit values. /Jan Olof

#37 sweetlilmre

sweetlilmre

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts

Posted 06 January 2011 - 06:38 AM

Hi

Does the Bitbanger need an external clock signal to work (that is what i beleive)?
How is the performans, how long from a clock until output, how fast can the next output bee, and so on ?
Does it sit in a tight loop doing the work, or is it interupt driven? I have seen an issue with Interupt latency but perhaps that is only for managed code.

Would it be possible to have it internally clocked, something like the OutputCompare, were you have an array of delays and the bit values.

/Jan Olof


Hi,

The BitBang will toggle the clock line for each bit of data output, in a tight loop, as fast as possible.
This is handled by the interop layer and is written in raw C code (well a C++ function, but effectively raw C) and should have a very low latency i.e. this is about as fast as it is possible to toggle pins without offloading to something like SPI.

Internal clock could be possible but is probably somewhat out of scope for the BitBang code. Perhaps there could be an extra parameter to introduce a fixed per bit delay if this was a valid use-case? i.e. delay X microseconds after each clock pulse.

-(e)

#38 sweetlilmre

sweetlilmre

    Advanced Member

  • Members
  • PipPipPip
  • 62 posts

Posted 06 January 2011 - 06:39 AM

Does this BitBanger project have a home page and more information ?


Hi,

No it doesn't but should :) I'll try and generate some SandCastle or similar docco at some point.
-(e)

#39 SteveS

SteveS

    Member

  • Members
  • PipPip
  • 21 posts

Posted 02 February 2011 - 04:17 PM

Hi all,

I've attached the latest code which I got a chance to test last night. It seems to perform well (and work!) :)

Hookedup: if you want to flash this you will need to reflash your bootloader (tinybooterdecompressor.bin is included) and then flash the hex files included.

Source is in the archive as well.

Chris, now I just need to rename / whatever to make this an appropriate fit for the firmware.

Thanks
-(e)


I've arrived late to the party. The use case outlined is just what I'm experiencing. I've used 8 bit stuff in the past (Arduino), and I find, as an example, that I just can't drive bits fast enough. I have an Arduino-based project which uses four 0832 displays, but the Netduino version of it is too slow to be usable. Sending 32 bytes isn't so bad, but sending 128 means that you can actually see the updates taking place, so not ideal.

I'd prefer to use only SecretLabs stock firmware if possible, so including this in the firmwaare for the various Netduino models would be an easy solution. Is there a timeline for this?


Steve S

#40 Dave M.

Dave M.

    Advanced Member

  • Members
  • PipPipPip
  • 53 posts

Posted 13 September 2011 - 01:24 PM

I'd like to bump this topic as well. It's been a while since the last post. I have the latest SDK installed, but there isn't any BitBanger class available and I have SecretLabs.NETMF.Hardware referenced by default.




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.