|
Hello Mr. Cedrric Moonen,
http://www.renesas.com/fmwk.jsp?cnt=usb_family_landing.jsp&fp=/products/mpumcu/usb_device/
This is the link. In the search option at the top, enter "M16C/62P" and click on Go button. It will display a table. Search for "M30624FGPFP" in the last column. In that row, click on the "PDF". You will be presented with the data sheet, hardware manual and software manual for the product.
They have FOUSB as a tool to do the flash programming. But I donot want to use that tool. I want to implement the data transfer using C/C++. First stage for this is to write the driver or use the existing communication driver available. then next stage is to send the frames via USB. Can you tell me where can i get the ready made communication driver or source code for that?
Thanks in advance and best regards,
Paresh
|
|
|
|
|
We used the USBHIDAPI.DLL from www.kadtronix.com[^] and had very good luck with it. If you know what the bytes are coming from the device and can parse it yourself, then you're all set. We used it for a special joystick (HID device, not game device) to read analog X, Y, and Z values and the DLL was very responsive. We could also send info to it to calibrate it. It is compatible with VC++ and VB and comes with .lib and .dll libraries
|
|
|
|
|
Paresh emb wrote:
How to communicate with a micro controller using USB port?
How can I access USB port (COM 5)?[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
There's an easy way to communicate with usb devices. With build in usb device io you're not really able to write to usb devices easily.
Just install the libusb drivers which has a filesize of about 1/7 MB. There are alreay src samples delivered with this package. You just need to know what you would like to send to the device.
|
|
|
|
|
Can I know where is the website for this libusb driver?
I downloaded and install the files from
http://libusb-win32.sourceforge.net/#support
1) libusb-win32-filter-bin-0.1.10.1.exe
2) libusb-win32-src-0.1.10.1.tar.gz
3)libusb-win32-device-bin-0.1.10.1.tar.gz
I could not find any documentation to link it with
visual C ++ . Can anyone advise me? Or link me to one
documentation?
THere is error whenever i try to use the data
structure in libusb.
Thanks
cheers
Dingyao
|
|
|
|
|
Just a sample for libusb libusb-win32-filter-bin-0.1.8.0.exe
To enumerate all webcams connected to your usb port..... looks a bit messy here
1)
struct usb_bus *bus;
struct usb_device *dev;
usb_init();
usb_find_busses();
usb_find_devices();
for (bus = usb_get_busses(); bus; bus = bus >next)
{
for (dev = bus->devices; dev; dev = dev->next)
{
usb_dev_handle *udev;
if (!((dev->descriptor.idVendor==PRODUCT_VENDOR_ID) && (dev->descriptor.idProduct == PRODUCT_ID)))
continue;
udev = usb_open(dev);
if (udev)
{
..... Do something here
usb_close (udev);
}
}
// ---------------------------------------------
To send something to the usb device ....
buf[0] = pan & 0xff;
buf[1] = (pan>>8) & 0xff;
buf[2] = tilt & 0xff;
buf[3] = (tilt>>8) & 0xff;
usb_control_msg(udev, XX, XX, XX, XX, buf, X, XX);
..where XX is device specific
-- modified at 12:28 Wednesday 14th September, 2005
|
|
|
|
|
I'm puzzled by ON_WM_CREATE() macro's definition
{ WM_CREATE, 0, 0, 0, AfxSig_is, \
(AFX_PMSG)(AFX_PMSGW)(int (AFX_MSG_CALL CWnd::*)(LPCREATESTRUCT))&OnCreate }
I know that the text in bold is a pointer to CWnd's function, and I know the statement after the last period is the "routine to call", But I don't quite understand what the statement trying to accomplish, Is it just a cast for function OnCreate?
|
|
|
|
|
Hello,
First, why do you wan't to know how the message macro's work?
I created a thread class, that also has a message map and the following explanation comes from my experiance.
The message map of MFC is an array of structs. These structs have one general pointer to a message. (Casting back to the right form is done using signatures.)
The statement is casting a function pointer to a general pointer used by the the message map of MFC. This is done in multiple steps, since you cannot cast it directly. The compiler will complain heavily about casting function pointers. For this reason it is first casted to a base class member function pointer. Second it is casted to an intermediate type and finally it is casted to the general type.
I hope this helps.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Bob Stanneveld wrote:
First, why do you wan't to know how the message macro's work?
Out of curiosity, and what's more I'm trying to understand how my dialog based class hear the Windows calling, such that I'm not take for granted everytime I put a message macro in my class!Your reply did help!
Thanks Bob!;)
|
|
|
|
|
Bob Stanneveld wrote:
First, why do you wan't to know how the message macro's work?
Out of curiosity, and what's more I'm trying to understand how my dialog based class hear the Windows calling, such that I'm not take for granted everytime I put a message macro in my class!Your reply did help!
Thanks Bob!
|
|
|
|
|
You're welcome
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Dear all,
I have a problem in Visual Studio .NET 2003 about implementing tooltips for dialog based controls e.g. buttons migrating from Visual Studio 6.0 which drives me crazy. In VS 6.0 the tooltips work without any problem for all controls using the method listed below:
void ...:: OnInitDialog()
{ ...
EnableToolTips (TRUE);
... };
ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipNotify)
BOOL ...::OnToolTipNotify (UINT id, NMHDR* pNMHDR, LRESULT* pResult)
{
// Tooltip Daten holen
TOOLTIPTEXT *pTTT = (TOOLTIPTEXT*) pNMHDR;
// ID des sendenden Dialogelementes holen
UINT nID = pTTT->hdr.idFrom;
...}
If I compile and link the source code using .NET 2003 Professional the tooltips appear for some controls, and for some controls NOT. I don't know why. I found that for some controls the message handler OnToolTipNotify will be started, for some controls not. I could check it setting a break point.
Is there any solution for this problem known ? Thanks for all help.
Ulrich
|
|
|
|
|
Hi all,
iam working in vc++, i want to fetch the columns from a table.
CDatabase db;
CRecordset myset(&db);
myset.open(CRecordset::snapshot,"Select *from mytable");
this my code. Here error is
"No columns were bound prior to calling SQLFetchScroll/SQLExtendedFetch"
so what is it mean. Mytable contains 4 rows and two columns
how can i slove this problem...........
plz help me
|
|
|
|
|
I had this error before and I think I solved it by opening the recordset with the CRecordset::dynaset option:
myset.open(CRecordset::dynaset,"Select *from mytable");<br />
But I'm not sure anymore, so don't blame me if this doesn't work
|
|
|
|
|
Hello all,
I am using iocp in an application that routes frames between
clients.
However the threads in the iocp framework continue to exit (Return code: 0x0).
Can anyone throw any ideas of what can make them do this?
In advance thanks.
Michael Olsen
|
|
|
|
|
Difficult to say with such a level of info I have. But when I assume that you implemented the iocp correctly, it can be that you simply end the thread proc. somewhere - forgotten return, uncatched exception whatever like that
|
|
|
|
|
I am trying to show jpeg images in an ordinary dialog using visual c++ but
i am looking for help. Many thanx
Phil
|
|
|
|
|
jj921 wrote:
I am trying to show jpeg images in an ordinary dialog using visual c++
This link will Help :-
CEnBitmap[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
|
Please Check again!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi All
Can anyone plz give sample code for receiving call by using Tapi3.0 or higher.
Thanks
Nayan
|
|
|
|
|
I see this statement "#if(WINVER >= 0x0500)" in winuser.h . I am using WinXP still I cant use the definitions defined below it. What compiler settings do i need ?
|
|
|
|
|
|
You need to set the WINVER macro to a higer version. If you are using VC 6. the windows version is set to 0x0400. This is because MS thinks that you must know what platform you are targetting if you wan't to use functions that are not supported by previous versions of windows.
See here[^] for more information about windows versions and the marcos associated with it.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
so, I have an .exe-file on my USB-stick(I wrote this exe.-file myself). now I need a command for another application. this application has to search where is USB-stick (A: or C: or D: or F with my .exe-file. Because the location of it is different at all users. at me for example the location is F: , at my friend E: . and then this .exe-file must run automaticaly...
thank you
|
|
|
|