| Author |
Message |
|
|
Posted: Nov 05, 2006 - 09:35 PM |
|


Joined: Nov 17, 2004
Posts: 6144
Location: Great Smokey Mountains.
|
|
THIS IS NOW OBSOLETE - go to www.smileymicros.com for the latest Simple Terminal source code, executable, and documentation
THE FOLLOWING IS OBSOLETE
The first 30 downloaders got some bad code, so if you were one, please download Beta2 Zipped.zip
SORRY FOR THE INCONVENIENCE
The free C# 2005 Express (http://msdn.microsoft.com/vstudio/express/visualc/download/) provides an easy (relatively) way to create a PC side GUI (Graphical User Interface) for serial communication with a microcontroller. I've pulled out a chapter (28 pages) of a book I'm working on. This chapter, The Simple Terminal Source Code - beta release.pdf is appended and shows how to build a simple terminal for serial communications between a PC and a COM port device. The appended zip file also contains two directories with the related source code.
I think that this would be a good way for someone interested in microcontrollers to learn to create PC GUIs and I'm willing to provide help (either on this thread or via emails) to anyone who wants to read the chapter and work through the materials to build the C# programs. In return all I ask is some feedback, especially looking for typos, stupidos, and what-tha-fuuu-os.
EDIT: Fixed bug for Settings menu returning a null string for a COM port. See below for now. I'll add the fix to the code later and delete this EDIT line.
EDIT: Can't find COM ports on Windows 2000. I'll look into this.
Smiley
PS
The download will be named index.php, change that to Beta2Zipped.zip on your computer. |
_________________ FREE TUTORIAL: 'Quick Start Guide for Using the WinAVR C Compiler with ATMEL's AVR Butterfly' AVAILABLE AT: http://www.smileymicros.com
Last edited by smileymicros on Jun 04, 2008 - 08:12 PM; edited 7 times in total
|
| |
|
|
|
|
|
Posted: Nov 06, 2006 - 04:22 AM |
|


Joined: Mar 28, 2001
Posts: 20630
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)
|
|
Just downloaded the file. There is an error generated if the Cancel button is pressed instead of the Okay button. Hmmm don't know about the Pink colouring though Can't seem to get it to work, it echoes back what I type but nothing seesm to be received...I'll keep on trying things out as I have a bit more time. |
_________________ John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
|
| |
|
|
|
|
|
Posted: Nov 06, 2006 - 03:03 PM |
|


Joined: Nov 17, 2004
Posts: 6144
Location: Great Smokey Mountains.
|
|
John,
My bad, first of many, thanks for finding this. I did all my testing with a COM port hanging on the computer and didn't test the Cancel button. As it is you must select a COM port before clicking Okay or Cancel. I'll fix it so that it doesn't require a COM port be available and can be Canceled gracefully.
'Pink colouring'? - it is 'Bisque' for the form backcolor and 'Peach Puff' for the menu back color. I like them, and no, I'm not a Nancy boy.
Later... The following change to the settingsToolStripMenuItem_Click function seems to fix this problem:
Code:
private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
{
// Make sure the port isn't already open
if (serialPort1.IsOpen)
{
MessageBox.Show("The port must be closed before changing the settings.");
return;
}
else
{
// creat an instance of the settings form
Settings settings = new Settings();
if (settings.ShowDialog() == DialogResult.OK)
{
if (settings.selectedPort != "")
{
// set the serial port to the new settings
serialPort1.PortName = settings.selectedPort;
serialPort1.BaudRate = settings.selectedBaudrate;
UseCRLF = settings.UseCRLF;
// show the new settings in the form text line
showSettings();
}
else
{
MessageBox.Show("Error: Settings form returned with no COM port selected.");
return; // bail out
}
}
else
{
MessageBox.Show("Error: buttonSetup_Click - Settings dialog box did not return Okay.");
return; // bail out
}
// open the port
try
{
serialPort1.Close();
serialPort1.Open();
menuStrip1.Items[1].Text = "Close Port";
showSettings();
}
catch (System.Exception ex)
{
MessageBox.Show("Error - setupToolStripMenuItem_Click Exception: " + ex);
}
}
}
I'll update the code and document in a week or so once I've gotten more feedback.
Smiley |
_________________ FREE TUTORIAL: 'Quick Start Guide for Using the WinAVR C Compiler with ATMEL's AVR Butterfly' AVAILABLE AT: http://www.smileymicros.com
Last edited by smileymicros on Nov 06, 2006 - 04:07 PM; edited 2 times in total
|
| |
|
|
|
|
|
Posted: Nov 06, 2006 - 03:41 PM |
|


Joined: Jul 18, 2005
Posts: 62940
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
I get nothing listed in the "select port you want to use" box under settings ? (yet there are at least 4 com ports available on this Windows 2000 machine)
Cliff |
_________________
|
| |
|
|
|
|
|
Posted: Nov 06, 2006 - 04:13 PM |
|


Joined: Nov 17, 2004
Posts: 6144
Location: Great Smokey Mountains.
|
|
|
clawson wrote:
I get nothing listed in the "select port you want to use" box under settings ? (yet there are at least 4 com ports available on this Windows 2000 machine)
Cliff
If these show up in your device mangager, the code >should< be seeing them. I've only tested this on XP and my 2000 machine looks like a gutted fish at the moment, so I can't test the code for 2000 right now. I'm seriously thinking about returning to using 2000 exclusively anyway, so once I get that machine fixed, I'll see if I can run C# Express on it and test the code.
Smiley |
_________________ FREE TUTORIAL: 'Quick Start Guide for Using the WinAVR C Compiler with ATMEL's AVR Butterfly' AVAILABLE AT: http://www.smileymicros.com
|
| |
|
|
|
|
|
Posted: Nov 06, 2006 - 06:21 PM |
|


Joined: Jul 18, 2005
Posts: 62940
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
Joe,
Yup, they are there under device manager. I'll maybe try the program on my XP laptop instead and see how that gets on.
Cliff |
_________________
|
| |
|
|
|
|
|
Posted: Nov 06, 2006 - 09:35 PM |
|


Joined: Mar 28, 2001
Posts: 20630
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)
|
|
|
Quote:
The following change to the settingsToolStripMenuItem_Click function seems to fix this problem:
I have set up the project and will attempt the changes. |
_________________ John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
|
| |
|
|
|
|
|
Posted: Nov 06, 2006 - 10:25 PM |
|


Joined: Mar 28, 2001
Posts: 20630
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)
|
|
I pasted the new code into the project (old code commented out) and rebuilt the project, unfortunately the error message still appears if the 'cancel' or even the exit 'X' buttons are pressed instead of the OKAY. If I have a bit more time later on today I will try and find out what's happening. Also, as a suggestion, you may want to disable the minimise and maximise buttons on the settings form. Of course it would be nice if the settings menu activation would close the port without complaining, but then it would not be human would it
edit
Code:
else
{
MessageBox.Show("Error: buttonSetup_Click - Settings dialog box did not return Okay.");
return; // bail out
}
Well it seems that it is doing what it is being told to do and give an error message instead of just exiting the settings menu. Any reason to have the error message there? It's all a bit overwhelming for me, fortunately apart from the syntax being a little different it is pretty much like a VB project so I'm starting to find my way around. |
_________________ John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
|
| |
|
|
|
|
|
Posted: Nov 07, 2006 - 08:11 PM |
|


Joined: Mar 28, 2001
Posts: 20630
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)
|
|
| Downloaded the new version, the exe file that came with it still does not seem to receive properly.It sort of works with one of my boards but doesn't work with a Motorola HC11 programmer connected to com2. It will echo back what I type but doesn't show what comes back from the programmer. Will investigate later on. |
_________________ John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
|
| |
|
|
|
|
|
Posted: Nov 08, 2006 - 03:58 PM |
|

Joined: Apr 24, 2004
Posts: 32
|
|
Neat thread guys. Some may think this is off-topic, but I think a lot of people would like to know modern methods for the PC to "talk" to their AVR projects. Here is a smple code in C# I did a couple of years ago, prior to .NET framework 2.0. It used the MS Comm control that came w/MSVS 2003. Usable feature here is a PC CommPort finder, and a simple method to find a connected AVR or other device.
Sorry for the missing tabs, the article was not "pasted" this way.
Jack
/// <summary>
/// Setup communications. Search the PC for available Serial Ports and fill combo box with Valid Port Names, COM1, COM2 etc.
/// Also, there is a check-for-device connection code
/// </summary>
public int SetupComm(bool Auto)
{
bool flag;
int rt = (int)com.RThreshold;
int cl = (int)com.InputLen;
commportT = commport;
commbaudT = commbaud;
com.RThreshold = 0;
com.InputLen = 1;
bCommbinary = false;
if (com.PortOpen)
com.PortOpen = false;
cbCommport.Items.Clear();
version = "";
for (int k=1; k<17; k++)
{
flag = true;
try
{
com.CommPort = (short)k;
com.PortOpen = true;
}
catch (System.Runtime.InteropServices.COMException)
{
flag = false;
}
if (flag)
{
// we have found a valid Serial Port on this machine
cbCommport.Items.Add("COM"+k.ToString());
if (Auto)// do we want to auto-detect for our AVR device?
{
// first select 57600baud
com.PortOpen = false;
com.CommPort = (short)k;
commbaud = 57600;
com.Settings = "57600,N,8,1";
// Open the available port, and here is where we check to see if our AVR is attached to this Port
com.PortOpen = true;
com.InputLen = 14;
com.Output = "v";// My project sent a "v" command request for Version.
if (WaitComm(14, 250) > 13)// Now see if the AVR sends back a reply.
{
commport = k;
version = (string)com.Input;
break;
}
//now another baud rate etc,etc.
com.PortOpen = false;
com.CommPort = (short)k;
commbaud = 115200;
com.Settings = "115200,N,8,1";
com.PortOpen = true;
com.InputLen = 14;
com.Output = "v";
if (WaitComm(14, 250) > 13)
{
commport = k;
version = (string)com.Input;
break;
}
}
com.PortOpen = false;
}
}
if (com.PortOpen)
com.PortOpen = false;
if (!Auto)
{
cbBaud.Items.Clear();
cbBaud.Items.Add("57600");
cbBaud.Items.Add("115200");
cbCommport.SelectedText = "COM"+commport.ToString();
cbParity.SelectedText = commparity;
cbDatabits.SelectedText = commdatabits.ToString();
cbStopbits.SelectedText = commstopbits.ToString();
cbBaud.SelectedText = commbaud.ToString();
commportT = commport;
commbaudT = commbaud;
this.Text = "COM"+commport.ToString()+":"+commsettings;
this.ShowDialog();
}
InitCommPort();
return commport;
} |
|
|
| |
|
|
|
|
|
Posted: Nov 08, 2006 - 04:11 PM |
|

Joined: Apr 24, 2004
Posts: 32
|
|
I probably should point out that the MSCOMM control w/v2003 only supported COM1 - COM16. I'm not sure if v2005 (2.0) supports more than this or not. Could be a device mapping issue, especially with USB-RS232 converters (noted some that show up as COM67 etc.). I'd like very much for Smiley to post his 2.0 framework SerialPort tutorial!
Jack |
|
|
| |
|
|
|
|
|
Posted: Nov 08, 2006 - 04:31 PM |
|


Joined: Nov 17, 2004
Posts: 6144
Location: Great Smokey Mountains.
|
|
I'm pretty sure we can get COM1 to COM256 with the C# Serial Port Class, but I've only gotten up to the COM20's and only had about a dozen devices attached at once. I'll check into this when I get some time.
Smiley |
_________________ FREE TUTORIAL: 'Quick Start Guide for Using the WinAVR C Compiler with ATMEL's AVR Butterfly' AVAILABLE AT: http://www.smileymicros.com
|
| |
|
|
|
|
|
Posted: Nov 08, 2006 - 05:35 PM |
|


Joined: Jul 18, 2005
Posts: 62940
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
Is it possible that what I'm doing is not valid as I just tried the latest version on both my W2K and XP machines and got no ports listed under settings.
All I'm doing is opening the .zip file in Winzip and then, because I don't want to install 900K to my hard drive I'm just running SimpleTerm\bin\release\SimpleTerm.exe in isolation. Should this work or do I need to extract anything so that other .DLLs or something are visible?
Cliff |
_________________
|
| |
|
|
|
|
|
Posted: Nov 08, 2006 - 11:41 PM |
|


Joined: Nov 17, 2004
Posts: 6144
Location: Great Smokey Mountains.
|
|
No .DLLs.
Are your COM ports visible in the Windows Device Manager?
In the Settings form, do you see the same COM ports as in the WDM?
Are you double clicking one of them and seeing the name appear on the "Selected Port = " line?
I just realized that I posted the debug version and that might require that C# 2005 Express is installed in addition to .NET 2.0. I'm not sure how to test this. I guess I should do a release version and post that.
I appreciate the time you are taking to try to get this code running. It is damn frustrating to build a program that runs on one XP machine and not on another. I see this often in development and every time I curse Microsoft.
Smiley |
_________________ FREE TUTORIAL: 'Quick Start Guide for Using the WinAVR C Compiler with ATMEL's AVR Butterfly' AVAILABLE AT: http://www.smileymicros.com
|
| |
|
|
|
|
|
Posted: Nov 08, 2006 - 11:58 PM |
|


Joined: May 30, 2004
Posts: 8141
Location: Cincinnati, Ohio
|
|
|
smileymicros wrote:
No .DLLs.
Are your COM ports visible in the Windows Device Manager?
In the Settings form, do you see the same COM ports as in the WDM?
Are you double clicking one of them and seeing the name appear on the "Selected Port = " line?
I just realized that I posted the debug version and that might require that C# 2005 Express is installed in addition to .NET 2.0. I'm not sure how to test this. I guess I should do a release version and post that.
I appreciate the time you are taking to try to get this code running. It is damn frustrating to build a program that runs on one XP machine and not on another. I see this often in development and every time I curse Microsoft.
Smiley
Smiley,
I have noticed when experimenting with Visual C# that, if the project is actually publisehd, that process creates a bunch of post files and an installer.
You might try posting the published version so that it can actually be installed on a non-Visual C# system.
Just a thought... |
_________________ Carl W. Livingston, KC5OTL
microcarl@roadrunner.com
"There are only two ways to sleep well at night... be ignorant or be prepared."
The original Dragon Slayer !
Long live the AVR!!!
|
| |
|
|
|
|
|
Posted: Nov 09, 2006 - 12:03 AM |
|

Joined: Apr 24, 2004
Posts: 32
|
|
Some folks may not realize that the .NET (the CLR is part of this) framework adds at leat 20MB, when I checked it last. .NET 2.0 may be even bigger?
Jack |
|
|
| |
|
|
|
|
|
Posted: Nov 09, 2006 - 07:27 AM |
|

Joined: Aug 30, 2006
Posts: 30
|
|
Dear Smiley,
I tried yesterday your Terminal (downloaded from your webpage).
My result:
- good design, but:
- I connected it to the avr32-linux system (with 115200Kb)
- Your terminal is to slow, it mostly belongs on the scrolling time in the window.
- Please make the boxes (input,output) resizeable
Thanx
Dirk |
|
|
| |
|
|
|
|
|
Posted: Nov 09, 2006 - 09:31 AM |
|


Joined: Jul 18, 2005
Posts: 62940
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
OK, this is what I see (or rather don't see) on my XP laptop with .Net 2.0 installed:
(BTW the .zip file contains EIGHT different copies of SimpleTerm.exe - which one should I be using - I generally have been trying to use SimpleTerm/bin/Release/SimpleTerm.exe) |
_________________
|
| |
|
|
|
|
|
Posted: Nov 09, 2006 - 09:45 AM |
|


Joined: Mar 28, 2001
Posts: 20630
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)
|
|
I get the same thing now in the release directory but works ok in the debug directory. Also the settings window in the non working directory is Grey whilst the working directory it BISQUE (I call it Pink but Smiley frowns ) |
_________________ John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
|
| |
|
|
|
|
|
Posted: Nov 09, 2006 - 09:51 AM |
|


Joined: Jul 18, 2005
Posts: 62940
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
John,
Thanks for that - I never thought of running the debug version as I don't have the Visual Express debugger installed so figured that an image containing debug info was of no use to me. You live and learn. The debug image DOES list the COM ports for me and I'm now connected to a digital satellite receiver which is outputting a debug trace at 115,200
Cliff |
_________________
|
| |
|
|
|
|
|
Posted: Nov 09, 2006 - 06:52 PM |
|


Joined: Nov 17, 2004
Posts: 6144
Location: Great Smokey Mountains.
|
|
Cliff,
Glad you finally got it going, had me worried there
MicroCarl,
I've not used the 'publish' with C# before, but just did and I've posted the zip of the publish file. Since I don't have a virgin machine (not screwed by C# or .NET) I can't really test it. Also the main reason for posting this was for folks to use the source code and learn C# so they can modify the terminal as they wish. I'm not really sure how valuable this is as a stand alone terminal.
I'm finishing up the beta version of the Developer's Terminal and will start a thread on it soon.
Smiley |
_________________ FREE TUTORIAL: 'Quick Start Guide for Using the WinAVR C Compiler with ATMEL's AVR Butterfly' AVAILABLE AT: http://www.smileymicros.com
|
| |
|
|
|
|
|
Posted: Nov 09, 2006 - 08:55 PM |
|


Joined: Mar 28, 2001
Posts: 20630
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)
|
|
A published version of the program will possibly try and download and install .NET2 automatically if it can't find it on the machine. At least that's what happens with my VB Message Sation program.
Just a little forewarning and I would be interested in feedback from people that don't have .NET2 yet to see if this is the case with C# also. |
_________________ John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
|
| |
|
|
|
|
|
Posted: Feb 21, 2008 - 12:36 AM |
|

Joined: Feb 21, 2008
Posts: 1
|
|
Hey Guys
I need some HELP!!!
I have programmed a Motorola 9S12DP256 board to receive data from heart and then the ADC on the board converts it to DIGITAL data, then I have a CLassII bluetooth which will transmit the data thru RS232 port to computer, the bluetooth sender and receive are conneted via Virtual COM5 port but I have to receive it in COM 2 port, is there a GUI you have which will just receive this data and save it in a file or at least plot all these data over time?
Thanks |
|
|
| |
|
|
|
|
|
Posted: Feb 21, 2008 - 01:05 AM |
|


Joined: Mar 28, 2001
Posts: 20630
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)
|
|
|
|
|
|
|
Posted: Feb 21, 2008 - 02:01 AM |
|

Joined: Nov 14, 2001
Posts: 3438
Location: Charlottesville, VA USA
|
|
|
Quote:
I need some HELP!!!
I agree !!!
Jeesh |
|
|
| |
|
|
|
|
|
Posted: Feb 22, 2008 - 01:08 AM |
|


Joined: Mar 28, 2001
Posts: 20630
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)
|
|
|
|
|
|
|
Posted: Apr 01, 2008 - 08:45 AM |
|

Joined: Jan 03, 2008
Posts: 11
|
|
thankyou this is a great help
PaulC |
|
|
| |
|
|
|
|
|
Posted: Apr 12, 2010 - 12:00 PM |
|

Joined: Mar 25, 2010
Posts: 8
|
|
|
smileymicros wrote:
THIS IS NOW OBSOLETE - go to www.smileymicros.com for the latest Simple Terminal source code, executable, and documentation
THE FOLLOWING IS OBSOLETE
The first 30 downloaders got some bad code, so if you were one, please download Beta2 Zipped.zip
SORRY FOR THE INCONVENIENCE
The free C# 2005 Express (http://msdn.microsoft.com/vstudio/express/visualc/download/) provides an easy (relatively) way to create a PC side GUI ( Graphical User Interface) for serial communication with a microcontroller. I've pulled out a chapter (28 pages) of a book I'm working on. This chapter, The Simple Terminal Source Code - beta release.pdf is appended and shows how to build a simple terminal for serial communications between a PC and a COM port device. The appended zip file also contains two directories with the related source code.
I think that this would be a good way for someone interested in microcontrollers to learn to create PC GUIs and I'm willing to provide help (either on this thread or via emails) to anyone who wants to read the chapter and work through the materials to build the C# programs. In return all I ask is some feedback, especially looking for typos, stupidos, and what-tha-fuuu-os.
EDIT: Fixed bug for Settings menu returning a null string for a COM port. See below for now. I'll add the fix to the code later and delete this EDIT line.
EDIT: Can't find COM ports on Windows 2000. I'll look into this.
Smiley
PS
The download will be named index.php, change that to Beta2Zipped.zip on your computer.
thanks so much ,can you send me your code in your spare time ,I really need it ,thanks so much much ,and my E-mail is : sduliuzhe@gmail.com |
|
|
| |
|
|
|
|
|
Posted: Apr 12, 2010 - 12:42 PM |
|

Joined: Mar 25, 2010
Posts: 8
|
|
|
smileymicros wrote:
THIS IS NOW OBSOLETE - go to www.smileymicros.com for the latest Simple Terminal source code, executable, and documentation
THE FOLLOWING IS OBSOLETE
The first 30 downloaders got some bad code, so if you were one, please download Beta2 Zipped.zip
SORRY FOR THE INCONVENIENCE
The free C# 2005 Express (http://msdn.microsoft.com/vstudio/express/visualc/download/) provides an easy (relatively) way to create a PC side GUI ( Graphical User Interface) for serial communication with a microcontroller. I've pulled out a chapter (28 pages) of a book I'm working on. This chapter, The Simple Terminal Source Code - beta release.pdf is appended and shows how to build a simple terminal for serial communications between a PC and a COM port device. The appended zip file also contains two directories with the related source code.
I think that this would be a good way for someone interested in microcontrollers to learn to create PC GUIs and I'm willing to provide help (either on this thread or via emails) to anyone who wants to read the chapter and work through the materials to build the C# programs. In return all I ask is some feedback, especially looking for typos, stupidos, and what-tha-fuuu-os.
EDIT: Fixed bug for Settings menu returning a null string for a COM port. See below for now. I'll add the fix to the code later and delete this EDIT line.
EDIT: Can't find COM ports on Windows 2000. I'll look into this.
Smiley
PS
The download will be named index.php, change that to Beta2Zipped.zip on your computer.
excuse me ,I couldn't find your code can you tell me where can I download ?or can you send me ,I need it !
thanks a lot |
|
|
| |
|
|
|
|
|
Posted: Apr 12, 2010 - 12:53 PM |
|

Joined: Mar 25, 2010
Posts: 8
|
|
|
smileymicros wrote:
Cliff,
Glad you finally got it going, had me worried there
MicroCarl,
I've not used the 'publish' with C# before, but just did and I've posted the zip of the publish file. Since I don't have a virgin machine (not screwed by C# or .NET) I can't really test it. Also the main reason for posting this was for folks to use the source code and learn C# so they can modify the terminal as they wish. I'm not really sure how valuable this is as a stand alone terminal.
I'm finishing up the beta version of the Developer's Terminal and will start a thread on it soon.
Smiley
Hi , S,Now I am doing a project. Part of them is about communicating data betwwen PC and microcontroller:
I want to give two number ,for example ,A=0x001122, B=0x223333 to microcontroller AVRMega8515.In microcontroller ,I have already write the algorithm "multiplication",Now I want to send A and B to SRAM (memory of Microcontroller),from PC and store it in SRAM ,then LD A and B to register using the algorithm to compute the result of A*B,. After that I store the result to SRAM,
and From SRAM ,give PC the result of multiplication of A and B.
That mean I should write a communicating programe betwwen SRAM and PC, maybe I should use the serial communicating port but I haven't find any example about that kind programe,Can you help me ?IF anyone who have some exprience with this ,can you attache your souce code ?Thanks so much !! and if someone know some website about that ,please tell me ,thanks !
my email is sduliuzhe@gmail.com
thanks a lot |
|
|
| |
|
|
|
|
|
Posted: Apr 12, 2010 - 05:57 PM |
|


Joined: Nov 17, 2004
Posts: 6144
Location: Great Smokey Mountains.
|
|
|
|
|
|
|