CW2's Content - Netduino Forums - Page 2
   
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.

CW2's Content

There have been 148 items by CW2 (Search limited from 28-September 23)


By content type

See this member's


Sort by                Order  

#60025 AT91_GPIO.cpp

Posted by CW2 on 07 September 2014 - 08:03 PM in Netduino Plus 2 (and Netduino Plus 1)

This mean AT91_GPIO is using for firmware(porting kit) and using for SDK(secret labs), too?

 

Not really. There are four parts:

  1. .NET Micro Framework Porting Kit
  2. Netduino firmware source by Secret Labs
  3. .NET Micro Framework SDK
  4. Secret Labs SDK (for Netduino boards)

AT91_GPIO.cpp is in 1. and 2. - these two parts you need to build the Netuino firmware. Install the .NET MF Porting Kit, download Netduino Firmware source zip and extract it over Porting Kit, overwriting the files.

 

.NET MF SDK (3.) must be installed to have .NET MF project support in Visual Studio and you also need Secret Labs SDK (4.) to have assemblies (.dll) and project templates for Netduino.

 

Excuse me, I don’t know about .obj file! Can you explain about it?

 

C/C++ source file is compiled into OBJ file, which is then linked with the rest of OBJ files and libraries into final executable, in this particular case (microcontroller) the 'executable' is in ELF format, which is then transformed into HEX (resp. SREC) or BIN suitable for flashing.

 

I don’t know where to start and which files should be changed!

 

Try searching the forum and wiki for 'building firmware' or such, it has been discussed numerous times. You'd need the source code, an ARM Toolchain and a lot of patience - 4.1 is rather old...




#60406 Tic Toc

Posted by CW2 on 13 October 2014 - 04:48 PM in General Discussion

I have seen it in the other forum. Impressive, to say the least! Hats off to the electronics team  :P




#61398 Native code interop

Posted by CW2 on 28 January 2015 - 07:21 AM in Netduino Plus 2 (and Netduino Plus 1)

... C# is interpreted but I'll write that down to a language barrier :-)

 

 

That is correct, in the current implementation of .NET Micro Framework, managed code (CIL) is interpreted (there is no JIT).




#59537 Assembly code

Posted by CW2 on 04 August 2014 - 06:08 AM in Visual Studio

Well, there is no assembly generated for the application - it is compiled [by .NET compiler, either C# or VB.NET] to assembly (.dll) which contains Common Intermediate Language (CIL), formerly called Microsoft Intermediate Language (MSIL). The current implementation of .NET Micro Framework does not have Just-In-Time compilation (that produces native assembly), the intermediate language code is interpreted.

 

You can use tools like ildasm.exe (part of the .NET Framework SDK, also installed with Visual Studio), .NET Reflector or any of its alternatives to view the contents of the .NET assembly, including the intermediate language disassembly.




#58673 VC0706 Adafruit camera and Netduino Plus 1

Posted by CW2 on 11 June 2014 - 07:54 AM in Netduino Plus 2 (and Netduino Plus 1)

Ok, thanks for the clarification. This was fixed in .NET Micro Framework 4.3 (see Issue #1388), you can set Convert.UseRFC4648Encoding property in order to get '+' and '/' instead of '!' and '*':
 

System.Convert.UseRFC4648Encoding = true;



#58666 VC0706 Adafruit camera and Netduino Plus 1

Posted by CW2 on 10 June 2014 - 05:43 PM in Netduino Plus 2 (and Netduino Plus 1)

How exactly are you converting the source string? Base64 is not simple substitution, it converts three octets (bytes) into four 6-bit encoded characters, using some bit manipulation.



#58169 Multiple Sensors To Single Serial Port

Posted by CW2 on 16 May 2014 - 11:07 AM in Netduino Plus 2 (and Netduino Plus 1)

+-------+   +-------+       +-------+
| SRF01 |   | SRF01 |  ...  | SRF01 |
+-------+   +-------+       +-------+
    |           |               |
    |           |               |
    +-----------+----- ... -----+   Serial I/O
                |
                | TX
          +-----+----+
          | Netduino |
          +----------+
The physical connection depends on what connectors or wires are you using. You might be able to put a few wires into the Netduino female header if they are thin enough, otherwise you can simply twist them around, use a breadboard, or some kind of connector extender etc.



#58173 Multiple Sensors To Single Serial Port

Posted by CW2 on 16 May 2014 - 01:29 PM in Netduino Plus 2 (and Netduino Plus 1)

Click to see larger version...

Attached Thumbnails

  • SRF01.PNG



#59770 Small update from the .net MF team

Posted by CW2 on 18 August 2014 - 07:51 PM in General Discussion

Fingers crossed  :P




#58426 Netduino alternative development options

Posted by CW2 on 27 May 2014 - 01:40 PM in Netduino 2 (and Netduino 1)

I am not sure what exactly you are asking... you kind of answered your own question in the last sentence in the original article.

 

It is certainly possible to program Netduino boards in C/C++, using toolchains you mentioned above. I am not familiar with ARM DS-5, but if you are looking for IDE then there are for example free/evaluation version of commecial products like Keil MDK Lite,  IAR EWARM, CrossWorks for ARM, free CooCox CoIDE etc. Usually, they come with a few sample applications and sometimes even with higher level libraries...

 

You can use any RTOS, as long as the appropriate microcontroller port is available, using supported toolchain/IDE - you'd have to check the particular RTOS documentation, based on what exactly you need/want to do.




#58430 Netduino alternative development options

Posted by CW2 on 27 May 2014 - 02:39 PM in Netduino 2 (and Netduino 1)

For STM32F-based Netduinos (gen 2), you can use DfuSe utility to upload firmware when the device is in USB bootloader mode. During development, it is better to use JTAG or SWD in-circuit debugger/programmer, such as ST-LINK/V2.

 

Usually, the IDE supports at least one such debugger, so it is relatively easy to deploy the compiled binaries, place breakpoints and step through the code...




#60753 DateTime in NativeEventHandler()

Posted by CW2 on 19 November 2014 - 07:44 AM in Netduino Plus 2 (and Netduino Plus 1)

The time resolution on gen 2 Netduinos is 1 µs.

 

The microcontroller has many timers with multiple capture/compare channels, unfortunately this functionality is not exposed in the current implementation of .NET Micro Framework. For precise measurements you'd need to add the functionality to the firmware or abuse any of the existing hardware modules (UART, SPI?).




#60758 DateTime in NativeEventHandler()

Posted by CW2 on 19 November 2014 - 03:06 PM in Netduino Plus 2 (and Netduino Plus 1)

I will assume that by resolution of 1µs, you also mean accuracy of 1 µs.


Unfortunately, I don't know the accuracy.




#57392 Adding to Cpu.Pin enumeration

Posted by CW2 on 07 April 2014 - 06:46 AM in Netduino 2 (and Netduino 1)

You can access those pins via Cpu.Pin enumeration - the ports are treated as consecutive array of pins, so PA is 0 .. 15, PB 16 .. 31, PC 32 .. 47 etc.:

var pa4 = (Cpu.Pin)( 0 + 4);
var pb1 = (Cpu.Pin)(16 + 1);
var pc0 = (Cpu.Pin)(16 + 0);
var pc8 = (Cpu.Pin)(32 + 8);



#59774 Netduino Plus 1 and Pins class

Posted by CW2 on 18 August 2014 - 08:44 PM in Netduino Plus 2 (and Netduino Plus 1)

So you can see Pins class in a new tab, and you can see this code!

 

Ok, thanks for the information. Well, the explanation is the code you see is not the actual source, but generated by Visual Studio via reflection - and obviously it is not quite correct, as the [mandatory] cast is missing. It could even be a 'feature', to make the definition easier to read by removing the obvious cast.




#59765 Netduino Plus 1 and Pins class

Posted by CW2 on 18 August 2014 - 07:01 PM in Netduino Plus 2 (and Netduino Plus 1)

public const Cpu.Pin ONBOARD_LED = 55;

 

Where exactly do you see this code? I cannot find it anywhere in the source. Are you inspecting the assembly (.dll) with some tool like .NET Reflector?




#59343 NP2 IRF510 MOSFET

Posted by CW2 on 22 July 2014 - 12:35 PM in Netduino Plus 2 (and Netduino Plus 1)

What kind of load does the transistor switch? What is the current?

 

IRF510 can switch ~1A at VGS = 5V, but I am a little bit suspicious about that "...to open the circuit enough..."

 

You can use any general purpose/small signal BJT (2Nxxxx, BC5xx) or MOSFET (e.g. BS170) to control the power MOSFET. In special case (e.g. very fast switching) you might need a dedicated MOSFET driver IC.

 

IRL510 is the variant with lower gate threshold voltage (<2V), it can switch 1A at VGS > ~2.75V.




#60712 Problem with Pete Brown's post

Posted by CW2 on 14 November 2014 - 10:48 AM in General Discussion

It happens for me too, database error.




#59790 ISR in interop

Posted by CW2 on 20 August 2014 - 06:42 AM in Netduino Plus 2 (and Netduino Plus 1)

Default PK use GPIO ISR handler for checking out the stream on usart. I will test and share results.

 
Well, not really - STM32F4 firmware uses USART interrupt handlers, see STM32_usart_functions.cpp:

CPU_INTC_ActivateInterrupt(g_STM32_UART_Irq[uartNum], STM32_USART_Interrupt0, 0);

GPIO ISR is used in STM32_GPIO_functions.cpp to handle pin interrupts, does not do anything with USART.




#59786 ISR in interop

Posted by CW2 on 19 August 2014 - 06:29 AM in Netduino Plus 2 (and Netduino Plus 1)

You should be able to hit a breakpoint in an ISR handler - if you can't, it can indicate it is never called (do you actually activate/enable it in your code?).

 

What version of Netduino do you have? Are you developing a port for a new microcontroller? There is already USART ISR handler implemented in the firmware - you can use it as a reference for things needed to get it work (e.g. configure pins, enable peripheral clock, activate interrupt, setup USART module, use locks etc.).




#59789 ISR in interop

Posted by CW2 on 20 August 2014 - 06:32 AM in Netduino Plus 2 (and Netduino Plus 1)

But my code is confirmed in native project(Keil), now I'm finding the problem.

 

When you use your ISR handler, have you disabled/removed the one in the firmware? There will be a conflict - .NET Micro Framework does not have any support for hardware resource sharing/management, so one must be a little bit careful when adding custom functionality.

 

Also, there are some things you have to add to your native code (which works in Keil) to make it work correctly in .NET Micro Framework - such as properly reserve the pins, use lock macros, etc.




#60045 USB power vs. input power

Posted by CW2 on 09 September 2014 - 11:18 AM in Netduino Plus 2 (and Netduino Plus 1)

If I use an external power supply with 5V and connect it through the Micro USB port, will it provide sufficient power to the netduino including all pins (PWM, ...)?


Yes.
 

I can't find any available industrial power supplies with 7.5 - 9V

 

You don't need an industrial grade power supply, a wall adapter is sufficient.

 

I guess I can't use 5V input on the power socket?

 

No, the onboard linear regulator requires at least ~6.5 V input.




#61685 I2C on original netduino not reading multiple bytes

Posted by CW2 on 21 February 2015 - 07:58 PM in Netduino 2 (and Netduino 1)

You'd need special I2C methods that support repeated-start condition, as described in http://forums.netdui...rt-bit-support/




#58624 Questions for a long term MIDI project.

Posted by CW2 on 07 June 2014 - 07:23 PM in Netduino Go

I am not a MIDI expert, but I am afraid software routing implemented in .NET Micro Framework would not work very well due to the latency caused by slow (interpreted) execution of the manged code.

 

How about hardware routing, i.e. some kind of switch matrix, which would be controlled by Netduino?




#58640 Questions for a long term MIDI project.

Posted by CW2 on 08 June 2014 - 06:23 PM in Netduino Go

CW2, even though MIDI is so slow (in comparison to modern stuff anyways, I mean MIDI is as slow as an old modem) there could be problem with Managed code?

 

You should perform some tests to see how fast the serial communication routing in managed code really is. In the current version of .NET Micro Framework the managed code is interpreted, which means the execution is orders of magnitude slower than "native" code - think Basic interpreter vs. C/C++ compiler. I guess raw reading from one serial port and writing to another would not be significant slowdown, but it does take some time, and if you want to do some more processing (e.g. checking for whole messages, real-time clock synchronization etc.) the time will add up and the latency increases. While the MIDI transmission is not really that fast, latency in audio signal is something people can notice - so you should probably make some tests to see how much latency is introduced in your system, especially when routing the same input through multiple paths with different number of software nodes, if that is functionality you want to have at the end. A millisecond here or there should not be a problem, but tens of milliseconds could be noticeable (especially when you can hear the original sound). Another problem with audio processing is jitter - how much the latency varies. .NET Micro Framework is not real-time operating system, so there are no timing guarantees, interrupts are queued, the execution of managed code can be interrupted at any time for any reason, for example by garbage collecting. You'd have to program carefully to minimize such events.

 

 





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.