15,894,720 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by SandiegoSSD (Top 36 by date)
SandiegoSSD
17-Jan-13 12:30pm
View
It's all in one single thread. After sending the "Go" command to the motor and letting it keep running until told otherwise, a timer starts ticking and every tick event checks whether the motor has turned desired number of revolutions(this is done by sending a query command to the motor encoder unit). So when the motor is manually shut down, the query command ( seriPort1.Write("W" & vbCr)
strRead1 += seriPort1.ReadLine() ) can never finish and freezes the form
SandiegoSSD
16-Jan-13 22:03pm
View
yes...run time. part of my brain slipped again
SandiegoSSD
7-Jan-13 17:15pm
View
I used int (which it seems like I should for ADCW)
and itoa()
works now.
Receive 128 for 0.65V on the serial port
SandiegoSSD
27-Dec-12 17:38pm
View
Thank you for the answer. Stopwatch is working for me. My timescale's pretty big. I just tested with four relays and it takes about 2 seconds to cycle through them with my code. Run it 10 times, each time is around several tens of milliseconds different from each other(I'm interfacing with mechanical arms and relays so it's not digital precise)
SandiegoSSD
27-Dec-12 16:04pm
View
well.. a question not very well thought of I guess.
Now that I typed it out I think I should just use another timer
SandiegoSSD
19-Dec-12 14:40pm
View
it Works now!
also I intended to say
if (strncmp(Command_String,"ABC",3) == 0)
printstring(Command_String);
I didn't realize 0 indicates the two strings are the same.
SandiegoSSD
19-Dec-12 14:25pm
View
Thank you for the tips.
Regarding the strncmp, I thought it would give non zero for identical strings..but now I see that it actually gives 0 for identical ones. Thanks
SandiegoSSD
18-Dec-12 17:57pm
View
Enlightening! will try tomorrow
SandiegoSSD
18-Dec-12 15:59pm
View
I was trying to use 'C' as a terminating char. I could've use \0 or \n to be more explicit.
SandiegoSSD
17-Dec-12 18:29pm
View
Thank you for the heads up
SandiegoSSD
17-Dec-12 18:19pm
View
Deleted
Thank you for the heads up.
Also I assume if pBuffer is defined as char *,
then " strcat (pBuffer, some_char) " would not append the some_char to pBuffer.
Maybe I could do something like
*pBuffer = RingBuffer_Remove(&Buffer);
pBuffer++;
What do you suggest?
SandiegoSSD
17-Dec-12 16:03pm
View
I guess I should narrow down my question to : I have some doubts about what type I should use for that "Command_String", which holds the char data read from Buffer. Also some clarification on whether I should be checking '\n' or '\0' as the string terminator? (while this checking happens on the microcontroller side, on my VB GUI which sends data to the microcontroller, I can send either \n or \0 whichever is necessary)
SandiegoSSD
19-Nov-12 17:13pm
View
well,what a learning curve..
SandiegoSSD
19-Nov-12 17:12pm
View
yes..I learned PIC in school and that's the impression i have for PORTD1, an individual field of the register you can r/w
SandiegoSSD
19-Nov-12 17:04pm
View
yes....it turns out
#define PORTD _SFR_IO8(0x0B)
#define PORTD7 7
#define PORTD6 6
#define PORTD5 5
#define PORTD4 4
#define PORTD3 3
#define PORTD2 2
#define PORTD1 1
#define PORTD0 0
this is in iom324p.h , since I'm using ATmega324p
SandiegoSSD
19-Nov-12 16:02pm
View
http://www.pololu.com/docs/0J36/3.b
that's the page I was looking at to get started with the avr studio
SandiegoSSD
19-Nov-12 14:26pm
View
"|=" is a set bit mask. PORTD1 |= 1<<1, or just PORTD1 |= 0x01 (00000001b), simply set the first bit high
SandiegoSSD
19-Nov-12 14:18pm
View
Deleted
I know |= and shift. Just not sure why the PORTD1 would equal to 1 or whatever bit we are trying to set (i.e., if PORTD3 is used here instead, would we know that it equals to 3? 'cause we'd like to set the 3rd bit from right) . May this question is too AVR specific.
SandiegoSSD
23-Aug-12 16:01pm
View
Thx for the reply
SandiegoSSD
30-Jul-12 16:06pm
View
The project was upgraded from vb6 to .net, and it used to define ML as
ML = New MLApp.MLApp
I guess after switching to ML = CreateObject("Matlab.Application") during the upgrade, things changed.
I do remember during debug that I had to add the MLApp as a reference in the .net project to get rid of some debug errors.
SandiegoSSD
20-Jul-12 21:02pm
View
I changed my local time on computer to tomorrow(7/21) yet it still gives 7/20 when I build it, debug it on MY computer, whose local time is tomorrow. And this is before I even publish it.
SandiegoSSD
20-Jul-12 11:57am
View
Deleted
-----------
update: the Getexecutiveassembly() does work. i screwed it up the first time. sorry for the fussing
SandiegoSSD
6-Jul-12 18:39pm
View
THX! that does it.
SandiegoSSD
6-Jul-12 17:52pm
View
Well, it's going really slow now , not many people around at this moment... Happy Friday afternoon guys~ and also 4th July weekend i guess
SandiegoSSD
6-Jul-12 14:43pm
View
i just looked that word up in Urbandict. wow
SandiegoSSD
27-Jun-12 18:00pm
View
I really need something simple . I kinda remember from Win Xp this thing called Hyper terminal. i 'll check that out
SandiegoSSD
26-Jun-12 18:03pm
View
yes.. when inputmode set to be binary then it's bytes. and when set to text then it's string
SandiegoSSD
26-Jun-12 14:55pm
View
not sure..i think it should be Bytes
SandiegoSSD
20-Jun-12 13:17pm
View
thank you. I was screwing around and ended up using the same way you suggested.
SandiegoSSD
20-Jun-12 13:16pm
View
Thanks.5
SandiegoSSD
10-May-12 17:31pm
View
Deleted
Thank you guys for the post. i'm using List(of String) now. One concern: I do want to check thru this list of string and only add to it new strings that I read from table, not strings that's already in the list . I'm thinking of something like
Dim RefDesgStr As New List(Of String)
For Each row As DataRow In SubTables(index).Rows
temporaryStr = row.Item("RefDesg")
for each tempStr As String in RefDesgStr
if tempStr <> temporaryStr Then
RefDesgStr.Add(temporaryStr)
end if
next tempStr
next row
but sth's fishy about it
SandiegoSSD
10-May-12 15:42pm
View
Thank you guys for the detailed explanation..and go easy with the rookies
SandiegoSSD
9-May-12 14:42pm
View
Deleted
Thank you VJ Reddy for the solution. This does want I intended. There's one exception though. For my application some of the PartNum starts with 0, i.e., "0239904". Both DataView and LINQ get rid of the 0 when they put the data in the subtables. But I'd need to keep the 0 there as it is.. I was using some datagrid as below to visualize the subtables: DataGridView1.DataSource = subTables(0) DataGridView2.DataSource = subTables(1) DataGridView3.DataSource = SubTables(2) Any ideas to get around the 0 problem?
SandiegoSSD
9-May-12 14:35pm
View
Deleted
Thank you VJ Reddy for the solution. This does want I intended. There's one exception though. For my application some of the PartNum starts with 0, i.e., "0239904". Both DataView and LINQ get rid of the 0 when they put the data in the subtables. But I'd need to keep the 0 there as it is..
I was using some datagrid as below to visualize the subtables:
DataGridView1.DataSource = subTables(0)
DataGridView2.DataSource = subTables(1)
DataGridView3.DataSource = SubTables(2)
Any ideas to get around the 0 problem?
SandiegoSSD
16-Mar-12 14:43pm
View
Deleted
Do you think the BackgroundWorker will work here in this case?
SandiegoSSD
16-Mar-12 14:42pm
View
Deleted
Do you think the BackgroundWorker will work here in this case??
Show More