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.

oli4gate

Member Since 26 Dec 2013
Offline Last Active Feb 06 2014 06:13 PM
-----

Topics I've Started

register boundary address bit handling

12 January 2014 - 02:38 PM

Hello,

 

for a project I need to communicate with multidrop bus, a 9 bit UART communication. (no parity, one stopbit)

I tried to use the SerialPort class, but the SerialPort.DataBits property is out of range. It goes upto 8 databits.

 

In the AT915AM7X512 processors datasheet, I read that it can handle 9 bit USART communications through address bit handling.

 

Is it posssible with .NETMF to access or point to an absolute address and read or change the register data or control bit's?

 

I saw that the USART0 is in the 0xFFFC 0000 - 0xFFFC 3FFF range, I'm using C#.

 

anybody knows?

 

thanks,

Olivier

 

 

 

 

 


casting problem in C# from byte array to byte variable

10 January 2014 - 05:59 PM

Hi, I'm new to Netduino and C#

 

in my first project I have a casting problem.

 

this code :

byte checkSum = 0 ;byte[] dataFrame = new byte[5];checkSum = dataFrame[2] ^ dataFrame[3];

gives me this error : 

Cannot implicitly convert type 'int' into 'byte'. An explicit conversion exists (are you missing a cast?) 

 

 

but, this way, it works

byte checkSum = 0 ;byte[] dataFrame = new byte[5]; checkSum  = dataFrame[2];checkSum ^= dataFrame[3];

does anybody know why the first code doesn't work.

I would prefer to use only one line of code instead of two for this operation, and like to understand what went wrong?

 

tx,

Olivier

 


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.