Click here to Skip to main content
15,892,161 members
Home / Discussions / C#
   

C#

 
AnswerRe: get native resolution of LCD display Pin
harold aptroot3-Feb-09 11:49
harold aptroot3-Feb-09 11:49 
AnswerRe: get native resolution of LCD display Pin
Expert Coming3-Feb-09 16:45
Expert Coming3-Feb-09 16:45 
GeneralRe: get native resolution of LCD display Pin
LordZoster3-Feb-09 20:50
LordZoster3-Feb-09 20:50 
Questionabout one Registry problem Pin
Seraph_summer3-Feb-09 9:02
Seraph_summer3-Feb-09 9:02 
AnswerRe: about one Registry problem Pin
EliottA3-Feb-09 9:04
EliottA3-Feb-09 9:04 
AnswerRe: about one Registry problem Pin
jeffwask3-Feb-09 9:37
jeffwask3-Feb-09 9:37 
AnswerRe: about one Registry problem Pin
Seraph_summer3-Feb-09 9:48
Seraph_summer3-Feb-09 9:48 
QuestionProblems with serial port control in C# [modified] Pin
Cosmin Ciuraru3-Feb-09 8:01
Cosmin Ciuraru3-Feb-09 8:01 
Hello,

I'm using the serial port control from .net 2.0 and an usb to serial(3 wires configuration) converter in order to communicate with a logic analyzer. The device makes a print screen, and I query it to send it over serial to my pc. If the image displayed on the device contains more information, such as fonts and various colors, I have some problems. Here is my scenario:
-The device sends the image in pcl format.
-I receive the bytes in the datareceived event and write them with a binary writer on to the disk. I've tried writing each time the event fired, as well as setting a threshold of 50000 (the image is about 30000) and a timer (I thought the operation with the disk made me lose some data) in order to write the entire buffer, after the transfer is made.
-I can appreciate if the data is correct by using a pcl to image converter, which displays the original image.
-For certain images, the converter fails to display the source, in that parses the image on 2 pages, an it displays a string of characters that it couldn't interpret from the file. (it displays it on the image).
-I know that the image is sent correctly because I used matlab to make the transfer, and it got the image ok.
-i've started modifying this solution:
http://msmvps.com/blogs/coad/archive/2005/03/23/SerialPort-_2800_RS_2D00_232-Serial-COM-Port_2900_-in-C_2300_-.NET.aspx[^]

I've read there are some problems with the serial port control, and used this to avoid it:
http://msdn.microsoft.com/en-us/magazine/cc301786.aspx[^].

I've written a small c program, which I wanted to include in my c# code, it sends the command, but when I poll portAddress + 5(the status register), it returns 0 or 0x60, but never a 0x01.

I've written a c++ (createfile,readfile) to communicate with the device, the device does not respond.

Yes,this is a school project, yes I'm on a tight schedule and i really need some help. Thank you.

P.S.I'm not doing it in matlab, because I want to continue extending the program in order to provide a virtual lab, accessible via internet.

For code requests, situations I have missed to ilustrate, please ask and debate.

My later edit: the pc sees the serial port on com12, due to the adapter and it seems that in c++ i have to write \\\\.\\com12 if com>10 as parameter for createfile. In c#, getports() return the com12 though.

Cosmin.

modified on Tuesday, February 3, 2009 2:19 PM

AnswerRe: Problems with serial port control in C# Pin
Cosmin Ciuraru4-Feb-09 4:59
Cosmin Ciuraru4-Feb-09 4:59 
QuestionWhat's wrong with this code? Pin
Juvil John3-Feb-09 7:10
Juvil John3-Feb-09 7:10 
AnswerRe: What's wrong with this code? Pin
Kristian Sixhøj3-Feb-09 7:15
Kristian Sixhøj3-Feb-09 7:15 
AnswerRe: What's wrong with this code? Pin
Rob Philpott3-Feb-09 7:17
Rob Philpott3-Feb-09 7:17 
AnswerRe: What's wrong with this code? [modified] Pin
Luc Pattyn3-Feb-09 7:20
sitebuilderLuc Pattyn3-Feb-09 7:20 
GeneralRe: What's wrong with this code? Pin
Rob Philpott3-Feb-09 7:24
Rob Philpott3-Feb-09 7:24 
GeneralRe: What's wrong with this code? Pin
Juvil John3-Feb-09 7:38
Juvil John3-Feb-09 7:38 
GeneralRe: What's wrong with this code? Pin
Juvil John3-Feb-09 7:41
Juvil John3-Feb-09 7:41 
AnswerRe: What's wrong with this code? Pin
Wendelius3-Feb-09 8:15
mentorWendelius3-Feb-09 8:15 
GeneralRe: What's wrong with this code? Pin
Jon Rista3-Feb-09 10:36
Jon Rista3-Feb-09 10:36 
GeneralRe: What's wrong with this code? Pin
Wendelius3-Feb-09 11:05
mentorWendelius3-Feb-09 11:05 
AnswerRe: What's wrong with this code? Pin
martin_hughes3-Feb-09 8:41
martin_hughes3-Feb-09 8:41 
GeneralRe: What's wrong with this code? Pin
Juvil John3-Feb-09 8:50
Juvil John3-Feb-09 8:50 
Questionhelp Pin
Member 46759863-Feb-09 6:54
Member 46759863-Feb-09 6:54 
AnswerRe: help Pin
EliottA3-Feb-09 6:56
EliottA3-Feb-09 6:56 
AnswerRe: help Pin
musefan3-Feb-09 6:59
musefan3-Feb-09 6:59 
GeneralRe: help Pin
EliottA3-Feb-09 7:04
EliottA3-Feb-09 7:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.