CW2's Content - Netduino Forums - Page 4
   
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 24-May 23)


By content type

See this member's


Sort by                Order  

#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?




#57989 Commercial Product using Netduino - not competitive

Posted by CW2 on 07 May 2014 - 11:01 AM in General Discussion

You might also want to check out this interesting alternative to STM micros: 32-bit ARM MCUs by Spansion, .NET MF port on CodePlex (via GHI forums). Not sure about the availability, though.




#57991 Commercial Product using Netduino - not competitive

Posted by CW2 on 07 May 2014 - 11:35 AM in General Discussion

I think after funding $1M+ to Secret Labs there will be no alternatives to STM32 in NETMF ;)

 
The AGENT watch does not use ST micro, but Atmel (SAM4S, and a secondary tinyAVR)  :P




#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



#61509 Help me out with SPI Please.

Posted by CW2 on 04 February 2015 - 10:06 AM in Netduino 2 (and Netduino 1)

I don't know what else I must do to get the lcd working on this hardware.

 

Could you post a photo of the actual wiring?




#58049 how to set external REF voltage for ADC & REF voltage min and max values

Posted by CW2 on 11 May 2014 - 05:06 PM in Netduino Plus 2 (and Netduino Plus 1)

According to STM32F405RG datasheet page 388 (table.65), It says

...

How can I set reference voltage value on the Netduino side?

 

The LQFP64 package does not have VREF pins exposed, you'd need a bigger package (e.g. LQFP100).




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



#59351 Serial Issues

Posted by CW2 on 23 July 2014 - 01:48 PM in Netduino Plus 2 (and Netduino Plus 1)

Are you sure the RS232 port on your PC is 5V? Usually, they are standard ±12V; and "5V" RS232 can also mean ±5V (and not 0 - 5V). Netduino has 3.3V logic (inputs in digital mode are 5V tolerant), so you'd need a level converter to connect it to PC.




#59349 Serial Issues

Posted by CW2 on 23 July 2014 - 01:32 PM in Netduino Plus 2 (and Netduino Plus 1)

What cable do you use to connect Netduino Plus 2 to the PC? Could it be faulty (e.g. cheap USB converter)?
 
Also, does the data table in your original message mean that Netduino receives character with ASCII value 6 for the original '0' character, ASCII 103 for '1' etc.? If not, what data are you sending?




#59769 Visual Studio 2014

Posted by CW2 on 18 August 2014 - 07:25 PM in Visual Studio

I have not tried it myself (*), but it should be possible to compile .NET MF SDK for Visual Studio 2014 with appropriate modifications as described in Jan Ku?era's article (for 2013); although it might need a fix or two for Visual Studio SDK assembly references (due to some versioning issues).
 
(*) I decided to postpone my playing with certain .NET MF areas after Microsoft announced they were working on Visual Studio 2013 integration and that it will be released as VSX extension (the last post). I hope such extension will be [Visual Studio] version-independent.
 
Sal Ramirez said earlier today:
 

NETMF is still alive. As far as the Visual Studio integration, the team hit a couple of issues with code signing and the build environment. As soon as we resolve those issues we will post an update.

Thanks,

Sal




#59387 Netduino Unique ID

Posted by CW2 on 25 July 2014 - 12:13 PM in Netduino 2 (and Netduino 1)

Yes, MAC address can be changed.

 

The Netduino 2/Plus 2 microcontroller has unique ID feature, unfortunately it is not available in the current firmware, mostly due to privacy concerns (it has been already discussed several times on this forum). You can modify the firmware or you can use another device to store unique ID, such as EEPROM (small memory chip, interfaced from Netduino through SPI or I2C).




#59395 Netduino Unique ID

Posted by CW2 on 25 July 2014 - 02:04 PM in Netduino 2 (and Netduino 1)

Yes, that's right - the EEPROM can be changed that way. There is no exact equivalent of the microcontroller Unique ID feature (which cannot be changed, because it is in ROM), so you'd have to use modified firmware.




#59368 Netduino Unique ID

Posted by CW2 on 24 July 2014 - 01:49 PM in Netduino 2 (and Netduino 1)

What scope of uniqueness are you referring to?
 
The SKU determines the Netduino model:

  • 0x1000 (4096) ... Netduino,
  • 0x1001 (4097) ... Netduino Plus,
  • 0x1002 (4098) ... Netduino Mini,
  • 0x1003 (4099) ... Netduino Go,
  • 0x1004 (4100) ... Netduino Shield Base,
  • 0x1005 (4101) ... Netduino 2,
  • 0x1006 (4102) ... Netduino Plus 2.

The number is stored in the flash memory and the current firmware does not expose flash memory routines to user application, so in this context it cannot be changed programmatically. Technically, it is possible to customize the firmware to enable access to flash memory routines from the user application (managed code) and there are other programs that can be used to modify flash memory contents, such as MFDeploy, JTAG/SWD programmer etc.

 

Firmware update does not change SKU, unless you deliberately flash firmware for different SKU - e.g. it is possible to have Netduino firmware running on Netduino Plus (of course Plus-specific features do not work).




#56773 Emulator, can it handle OneWire ?

Posted by CW2 on 12 March 2014 - 06:29 PM in General Discussion

hi, is there a software to search the address of ds18b20?

 

What exactly would you need to do? The 1-Wire protocol has built-in mechanism for enumerating the devices present on the bus, all implementations I've seen support that - in the particular case of .NET Micro Framework, have a look at OneWire.FindAllDevices() method.




#56765 Native Code in C++

Posted by CW2 on 12 March 2014 - 08:04 AM in General Discussion

Unfortunately, Visual Studio does not support deployment over JTAG and I am not sure its ARM compiler can generate code for Cortex-M series. Probably the closest thing is VisualGDB.




#60572 74hc595 Shift Register and PWM

Posted by CW2 on 29 October 2014 - 05:30 PM in Netduino 2 (and Netduino 1)

You have to toggle the individual shift register outputs on and off periodically. In a trivial example, consider the following pseudocode:
 

while(true)
{                            // Output state
  shiftRegister.Write(0x03); // #0 = on,  #1 = on
  shiftRegister.Write(0x02); // #0 = off, #1 = on
  shiftRegister.Write(0x00); // #0 = off, #1 = off
  shiftRegister.Write(0x00); // #0 = off, #1 = off, 
}

The output #0 (least significant bit) is on for 1/4 of the cycle (loop), which translates to 25% PWM. The output #1 is on for 1/2 cycle -> 50% PWM. The other outputs are zero during the whole cycle -> 0% PWM.

 

The cycle (period) is divided into four parts, which allows only very coarse control (0 - 25 - 50 - 75 - 100%).

 

 

So, to produce PWM signal through shift register, you have to select a specific period, divide it into certain number of parts (finer division means finer PWM, e.g. 256 levels), and then toggle the outputs to produce pulses of a desired width. There are various ways how to implement it, a particularly clever one is called Binary Code Modulation.




#57800 Two's compliment byte array to int16 - confusing results.

Posted by CW2 on 28 April 2014 - 07:21 AM in General Discussion

For the serial number it says I will get back a 4 byte array which is the equivalent of this:
byte[] buff = new byte[8] { 0x00, 0x01, 0x36, 0xeb, 0x00, 0x0c, 0x45, 0xe3};
The number I am looking for is 79595 (real serial number of the camera)


Well, there is obviously an error in the documentation or you've pasted incorrect code - it says 4 byte array, yet it has 8 bytes. The number you are looking for 79595 is the first four bytes in the array: 
int serialNumber = (int)(buff[3] | (buff[2] << 8) | (buff[1] << 16) | (buff[0] << 24));
// 0xEB | 0x3600 | 0x010000 | 0x00 = 0x0136EB = 79595



#56778 Native Code in C++

Posted by CW2 on 13 March 2014 - 08:02 AM in General Discussion

Well, it depends on what exactly do you mean by "MiniJTAG"?

 

You'd need in-circuit debugger/programmer to deploy and debug the code, popular choices are for example ST-LINK/V2 or Segger J-Link. There are many others, but you should check VisualGDB support; they have tutorials for ST-Link and J-Link, so these two should work. They have standard 20 pin 0.1" pitch JTAG connector, so you'd need also an adapter for 10 pin 0.05" pitch mini JTAG, which looks like this or this, and if your Netduino does not come with the pin header, you'd need it too (FCI part at Digikey, or similar).

 

Tip: You can make el cheapo mini JTAG header from a copper wire: cut 10 pieces about 10 mm long from solid core copper wire that fits into Netduino board holes, insert them all into the female header so they stay in place and have proper length, stick through the board, solder and carefully cut the excess  ;)




#60476 Receiving Junk from Serial Port

Posted by CW2 on 20 October 2014 - 04:03 PM in Netduino Plus 2 (and Netduino Plus 1)

the voltage to the reader is supplied by an external power source and its the correct voltage, If I take the reader and connect a DB9 pin on it, connect to my pc and present my tag to it, it will spit out the correct values in HyperTerminal.

 
I think there is still some misunderstanding - the external power source does not directly relate to RS-232 (serial) line signal levels. If the reader works when directly plugged into PC (DB9), this means it uses ±10-15 V signals and that is why it does not work with Netduino, which requires 0/3.3..5V ("TTL UART").
 
Technical note: RS-232 transceivers usually have voltage boosting 'charge pumps' to convert supply voltage, e.g. 5V to +10..15V and -10..-15V required by the transmission line.

 

On a side note, If I purchase this reader (Link below) Can I connect this directly to netduino and read my tag code ?
http://netram.co.za/...odule-uart.html

 
Most likely yes, there is "UART TTL interface" in the feature list.




#60469 Receiving Junk from Serial Port

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

I am connecting my serial rs232 device to the netduino plus 2, D0 and D1 and GND. The device is a card reader.

 
Is the card reader designed to be plugged directly into PC serial port? If yes, then you are missing a level shifter (standard RS232 voltages are around ±10 .. 15V, while Netduino requires 3.3 .. 5V).




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




#60020 AT91_GPIO.cpp

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

It is in DeviceCode\Targets\Native\AT91\DeviceCode\AT91_GPIO folder. There are two versions: the original included in .NET Micro Framework Porting Kit and the one with Secret Labs modifications in the Netduino firmware source archive.
 

Has this change an affect on another files?

 

Well, it depends on the change. It is possible to change a C++ source file in a way that it does not affect the generated .obj file (e.g. adding a comment).

 

What steps are necessary to make this change?

 

Open the .cpp file in your favorite text editor...  :P

 

But I guess there is something else - what exactly do you want to achieve? Does it involve building the firmware?




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





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.