Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories

Serial DC motor control using 8051

Your while loop in main appears to be setting the 1-bit motor control with a 10% or 90% duty cycle, it does this by writing to motor which has been equated to P1. But after 100 writes it calls receive(), and that should leave the motor running, because the function won't return until a key is pressed. So I don't understand why the motor is sometimes stopped. When the function does return, your case statements do not take into account what other key might have been pressed, so you will be simply using k set from the previous key press. In addition, receive() waits for RXD and then writes the character received to P1 the motor control. So on the face of it, the LSB of RXD is being used to control the motor. But that's a bug, because on return from receive() P1 is again written to.

Categories : C

Related to : Serial DC motor control using 8051
How to set control to use user-defined control class c# windows forms
I apologize, I simply got rid of: logBox = new RichTextBox { Dock = DockStyle.Fill, Font = new Font("Courier New", 10) }; and now it works. I was expecting my existing richTextBox, logBox, to populate with text but this was not occurring until now.

Categories : C#
Serial communication trouble C#
You need to have an ending character to know when your message is completed. Most people are using a (13,10) and read from the serial port to the end of the line (i.e. ). You are getting an event for each character and reading it too quickly.

Categories : C#
Serial communication over RS232 and USB
(1) RS-232 is bidirectional. You can send and receive at the same time. (2) You do not have to write a USB driver for the host. Windows has this built in. Use the standard Windows serial I/O calls. They work the same way for serial ports and for USB to serial converters.

Categories : C++
resize control.size width designer in winform ,but this action affected other control size
Maybe you are accidentally selecting the other label, or maybe selecting both? Otherwise, I think you should try Label1.Autosize = False Here are 2 samples on ways to change a label's size (You can Import System.Drawing to make it cleaner) Label1.Size = New Size With {.Width = 50, .Height = 89} Label1.Size = New Size(50, 89) If that doesnt answer your problem, you might have to explain a li

Categories : Vb.Net
Forward Bluetooth socket to serial port
Figures that I'd get it right after posting. To anyone else looking to do something similar: Pair with bluez-simple-agent Create your serial port channel with sdptool add --channel=x sp Listen for a connection on that channel with sudo rfcomm listen /dev/rfcomm0 x Cross the streams with socat /dev/rfcomm0 /dev/usb/lp0 Beautiful. It's all so simple now.

Categories : Sockets
Recently Add
Cleanly access array of structures based on a value
Declaring a function pointer returning an array
Apparent confusion with pointers, arrays, and stdin
segmentation fault with accept() on linux
Reset all bits in a c bitfield
C , Pthreads - How to re-execute function or start_routine specified
Maximum data size that can be sent and received using sockets, at once?(TCP socket)
Macro in C to call a function returning integer and then return a string
How to define variables with decrease numbers in name in C/C++ using macro?
What's the different between args and &args?
Casting structure pointers between structs containing pointers to different types?
Finding palindromes in c, variable(s) messes up
Is this an example of a buffer overflow?
isspace not working correctly?
error: dereferencing pointer to incomplete type when accessing struct
counting words excepts the whitespace from file
C programming Syntax
What does '(*b) (int) = fubar;' mean?
Popping off a stack of char* to make a new string and return it
Using fscanf() in c to read multiple lines
Passing an array into a function in C
UNIX Programming, splitting screen with fork, exec, and communicating with pipe
request for member `result' in something not a structure or union
order of evaluation in C with assigning a variable with a function that changes a variable in the same assignment
Trouble with  escape sequence in fprintf statement..?
#include won't load header in C
how to interpret the operator's priority in *d++=*s++
C appending to file after writing
int *p=&a++ and int *p=&++a
Complex Data Type in C Producing Trouble in Algorithm
© Copyright 2017 Publishing Limited. All rights reserved.