473,399 Members | 3,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

RS232 & AVR-Board button

Hi

I'm programming C to an AVR-Board and would like to activate a register on
the board with an C# application. Instead of pressing the button (PINA.4 or
address 0x19 bit 4) , i would like to press a button i C# instead. I got a
serial connection to the board and experimented a bit, but i'm quite lost. I
know howto send text...
SerialPort port = new SerialPort("COM1", 9600, Parity.None, 8,
StopBits.One);

// Open the port for communications
port.Open();

// Write a string
port.Write(Convert.ToString(Convert.ToChar(0x19))) ;

// Close the port
port.Close();

Thank you in advance

/Lars

Nov 27 '06 #1
3 5003
"Lars" <La**@discussions.microsoft.comwrote in message
news:EE**********************************@microsof t.com...
Hi

I'm programming C to an AVR-Board and would like to activate a register on
the board with an C# application. Instead of pressing the button (PINA.4
or
address 0x19 bit 4) , i would like to press a button i C# instead. I got
a
serial connection to the board and experimented a bit, but i'm quite lost.
I
know howto send text...
I'm lost to, what are you asking?

Michael
Nov 27 '06 #2
I'm lost to, what are you asking?
Let me try again...

I want to use C# to send a '1' to a AVR-board, that '1' shall set bit 4 on
the hex address 0x19. That '1' should be send through RS232. I got the
connection working, i just don't know how or if it's possible to do that. I
know very little about C#.

/Lars

Nov 27 '06 #3
Lars wrote:
>>I'm lost to, what are you asking?

Let me try again...

I want to use C# to send a '1' to a AVR-board, that '1' shall set bit 4 on
the hex address 0x19. That '1' should be send through RS232. I got the
connection working, i just don't know how or if it's possible to do that. I
know very little about C#.

/Lars
Please post your code somewhere.

If you have a connection working, then this should work.

Can you use a terminal program and send the '1' to the AVR board ??

Does that work ?

Can you use a terminal on another computer and see the '1' comming from
your C# program ?
Testing is as important as writing a program. Get the tools that
simulate what you are trying to do.

donald
Nov 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dan | last post by:
I wnat to see in browser an status from an device connected on rs232 port The java class for read from serial port is: //Serial.java import java.io.*; import java.util.*; import...
6
by: Przemo | last post by:
Hi, Do you know some good RS232C class? There is one in VB.NET 101 Examples, but I think it is poor. 1. I can't for e.g. read into my application all data received. I must tell how many...
6
by: Affan Syed | last post by:
I am not able to figure out exactly what this macro is doing. Can one of the gurus around here decipher this? #define sei() __asm__ __volatile__ ("sei" ::) PS: It is from the avr-libc...
8
by: Terry Olsen | last post by:
I'm trying to use the RS232 class that was in the Platform SDK (i think). Has anyone else used this with events successfully? Here's what i've got: ====================== Public WithEvents...
2
by: RadGar | last post by:
Hi, I'm reposting my question in this group from comp.arch.embedded - as it was suggested to me that it might be better to do so. In advance to all reading: this is meant mostly for people who...
4
by: Dave Harry | last post by:
I found the RS232 class from MS's 101 VB samples. Writing to the port works fine. (I've got hyperterminal on the other comm port and a crossover cable between COM1 and COM2) The port is opened...
6
by: Henning M | last post by:
Hi all, Im trying to send a command to my uprocessor project, but when i try to read the answer for the uPU I get the same commed I just send to it??? It is as if the command isn't send before I...
3
by: ad | last post by:
I am using VS2005 to develop Web application. How can I receive the data from RS232 of client's computer?
3
by: lorenzvvv | last post by:
Hello! I need to compile a program where wctomb and mbtowc functions are in. These functions are useful for conversions from wide characters to multi-byte and vice versa. Avr-gcc lacks wctype.h...
3
by: phoenix1990 | last post by:
so i started learning avr-c programming a few weeks ago and i'm a little confused about using the eeprom so save values. i've been working a snake game for my project, and i need to save everything...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.