RS232 & AVR-Board button

G

Guest

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
 
M

Michael C

Lars said:
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
 
G

Guest

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
 
H

hjgvhv uhhgvjuhv

Lars said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top