Click here to Skip to main content
15,897,518 members

serialport and restart

Khalid Sabtan asked:

Open original thread
Hello
When the computer restart or shutdown does he sends any message to the serial port
(before restating or shtting down )
I have a microcontroller circuit connected to the computer through a serial port in which I let two led’s exchange their works after every second and this continues in an endless loop ,but if the user restart the computer I need to let the microcontroller program restart from the top of its program (prog.asm) too
How can I do that?
i am using window 7, the microcontroller is pic 16f883,i have two program one is c# and the other is assembly pic program the c# program sends messege to the pic program (and is located in the StartUp directory),assume the pic program is to do job A followed by job B. Job B is to alternat two led's forever,but if the user restart the computer the pic would be still working in Job B whic is not my desired ,i have to added a command inside the endless loop(in pic assembly program)or may be start an interrupt in which i could write
goto top_of_Pic_program ;
therefore i need some message from computer to inform the pic that the computer
has started from over so the pic program must start from the top too.i am using pin 2 and 3 of the serial port to read and write connected to rs232 ic which is connected to the 16f883. no error in either program but i want to improve it
Tags: Microcontroller

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900