|
Thanks for your reply.
Luc Pattyn wrote: without a specific driver your app might be able to interact with a peripheral, provided the peripheral uses a hardware interface that is supported by some general-purpose driver (e.g. for serial ports),
So if we write to a port using CreateFile, will that be using Serial-Driver? The serial driver gets loaded when you connect some device in the port or it's running always?
Also, does all hardware have the firmware on top for driver communication? Can any device without f/w be controlled by drivers alone?
Let me get little more simpler. Assume I have motor running in a device. Now I need to write a driver that handles the RMP of it. I want to read/ control the RPM.. What are the sequence required? Lot more to ask actually. I will ask.
----------------------------
286? WOWW!
|
|
|
|
|
_8086 wrote: So if we write to a port using CreateFile, will that be using Serial-Driver?
yes. a serial driver, there could be more than one e.g. one for the standard serial ports based on 16550 device, one for a specific USB-to-serial cable, etc. And there could even be more than one stacked on top of each other.
if by "device without firmware" you mean a dumb peripheral needing all its control from PC, that could be a bad idea; there was a time floppy drives had no intelligence, and interrupted the CPU for every byte transferred, that is once every 6 microseconds. You may remember Win98 with floppy activity didn't do anything else while a transfer was going on.
IMO peripherals need sufficient intelligence so they can left alone for 1 millisecond or more; so don't consider a PC driving a stepper motor; use a microcontroller for that.
Last advice: read some books and some articles on the subject.
|
|
|
|
|
thanks so much for this information. things are more clear to me now.
|
|
|
|
|
Often, in general, when people talk about a "device driver", that's low-level code that writes and read directly with the hardware. It uses absolute addresses. In general, user code can't write/read absolute hardware locations.
You would need a drive if you have custom hardware in your PC. That means if you make a PCI card with custom hardware, then a device driver needs to be written so that application-level programs can have access to the hardware. Think of it as a "delegate".
The above is the "simple answer".
But, wait, there's more!
For something that goes on the USB or network, that gets more involved. There are many software/firmware/hardware levels in a Network/USB/Firewire transaction.
So, we can quickly get into "terminology hell/confusion" when we start talking about "drivers".
I can argue what goes where in an application that uses TCP/IP over Ethernet. I can argue what goes where and why from the upper most GUI layer way down in the the core switching hub software. That's because of what I did in grad school and spent many many years in Networking.
But, with USB/Firewire, the distinction between hardware/firmware/software is always changing. Yes, it is similar in the Networking world. But, for me, words like "Brouter" (bridge/router) don't scare me, since I was designing Brouters in the 90's.
However, USB and Firewire are both very complicated! They are just as complicated as the TCP/IP flow. Maybe even more so since USB/Firewire now support so many different modes and hubs.
My point is that writing a "driver" for a new custom USB device is not the same as writing a driver for a new video card. Yes, they are both called "drivers". But, the "driver" that is written for a new USB device will be calling a lower level driver that talks directly to the USB chip/hardware. I hope that last sentence makes sense. Again, it's due to the different layers involved in a Network transaction. It may help to think of them as a "Layer 3 driver", "Layer 4 driver", etc.
So, a "driver" for a new USB device can easily be written in C# without the need to know any hardware details. Or, by knowing only a few higher level hardware details/limitations - like how fast the new device can take/send data if you don't want to overrun a buffer.
Since I do embedded CPUs and FPGAs, I often write low level drivers that directly control the hardware. It often takes a very good understanding of hardware and of the particular hardware.
On the other hand, I would be clueless on how to write a "USB driver" for a new custom USB device. There's a ton of stuff to learn and to understand. There's also the important interactions with the OS. I know of a number of USB devices that "hang the port" if they are disconnected without proper shutdown. I have a programmer for an embedded CPU that will blue screen my PC if I accidentally disconnect the USB during a chip program. That's a good case of someone that did a hack job writing the "USB driver" for that chip programmer.
Writing drivers are like that. Many people can write hack drivers. However, only a few people are very good at writing low level drivers. I know that Cypress is infamous for their horrible low-level drivers in their PSoC embedded CPU. They often have minimal or no error handling.
I like it because it's close to the hardware. Many people don't since it can be very hard to debug low-level drivers.
Hope the above helps, and doesn't confuse you more.
It may help to re-read it a few times. I tried to cover a lot of stuff in a little space.
______________
Joe
modified on Tuesday, September 8, 2009 3:00 AM
|
|
|
|
|
You've got some excellent answers here already, but let me add another that might help a bit.
Back in the good old days when we didn't have to deal with Windows I did a lot of programming devices; specifically, measuring devices to test military hardware. There were no standards then, not as we know them today. The operating system was customized for every machine model, and already "knew" how to send bits over a serial link or HPIB bus. But the languages used had constructs like READ_VOLTS(DC, 100, AVG, 10) to return the measured DC volts on a line, up to 100 Vdc, averaged over a period of 10 milliseconds.
But every oscilloscope, DMM, millivoltmeter, etc, recognized a different set of commands, unique to each manufacturer, and often each model. Usually these were in the form of text strings, and often the device listened for commands on a different physical address than the one used for data. For each device, we had to write a subprogram to translate what the operating system sent into a form the device could recognize. Today we'd call that subprogram a driver, and its job remains the same in the modern world.
If you were to design a new programmable device, a toaster perhaps, it would have built in commands that Windows knows nothing about. You might have a syntax containing something like:
ATDDSSSSHHMM#
where AT = Attention (new command setting follows)
DD = Darkness (1 - FF)
SSSS = Active slots (0001 - 1111)
HHMM = Start time (HH, hours; MM, minutes)
# = execute command
Your Toaster application program - the software your user runs to make toast - might output a command like:
Toast (Medium, 2, 5:30AM)
You would need to provide a driver to convert Medium to 80, 2 to 0011, and 5:30AM to 0530, then string them together into a command the toaster recognizes: AT8000110530#. On installation, your driver would register with Windows the addresses it listens to, and you would provide the port to which the physical toaster is connected. The driver would then ask Windows to send the commmand string it constructs using the assigned port when your program requests toast. Ideally, your driver would also notify Windows when the toast is done, so that the OS can tell your application program the status of the job.
In the Windows world, devices are not physical things, but software entities called drivers. The driver software does the actual manipulation of real objects, which adds layers of confusion for users trying to play with Device Manager.
Writing drivers is a difficult job, and requires far more in depth knowledge of hardware than most programmers care to learn. The Windows DDK is a separate entity from the usual development tools because it is so specialized that very few developers need to use it. You could write your own driver for a mouse, but why bother? If you want to have some fun, buy a development kit for any programmable microcontroller and wire it into something useless - a beer cooler or something - then write a driver to monitor and control it. Then try to make it work reliably in a real world environment. That's where the fun begins...
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Hello all
I am trying to learn how to control hardwares using windows applications VC++ or C# with or without assembly code ..
My idea is to develope some softwares which can control a less expensive robot , or move an arm to an angle or simply open close a door etc etc ...
Read/write to a USB memory stick and format it programmatically ...
I do not know if I am talking about micro controllers or what else ?...
Any ideas please on how do I start it ? That is : what hardware can I buy and code it in visual studio - it has to be cheap also .
I saw couple of articles in codeproject hardware section on robots but I found very little info on how to procure hardwares ..
Thanks in advance
|
|
|
|
|
C# + Assembly = Won't work. Unless you write a DLL in assembly and call it in C#. I should think a PIC microcontroller will be a good start?
If everything was not true, would it be not true that everything is not true? So by saying everything is not true, you are automatically denying that everything is not true. Im so confused...
FreeDOS
- An open source modern
MS-DOS/PC-DOS replacement.
|
|
|
|
|
|
Hello
Subject :how to use port forwarding
Internet------> Router in my network ------->LocalMachine(Windows
2003) -->Sqlserver2005
How access sqlserver through internet via Router in local network.
My router IP Address is =192.168.1.86;
My local machine which is connected to the router Ip Address is=
192.168.1.81
At port No=1433
tell me how to use port forwarding
Thanks for help in advance
Reply
email Add: manish.m.meshram@gmail.com
|
|
|
|
|
|
You can also get instructions for specific models of routers from portforward.com[^]
--Mike--
Dunder-Mifflin, this is Pam
|
|
|
|
|
In my system one serial port available.
In that I can receive data from other device but I can't send the any data from PC to Machine.
I was check following.
1. Cable is working or not. [It is working in other system]
2. Device is working or not. [It is working in other system]
3. software is working or not. [It is working in other system]
How can i come out from this problem please help me.
Thanks in advance.
|
|
|
|
|
Hi,
You provided insufficient information to work on. Here are some of the possibilities:
1. your cable or target device is unreliable, it works only sometimes.
2. your voltage levels don't really match; the machine it is not working on is not getting at a sufficient voltage level (may well happen with cheap and/or long cables).
3. your transmitter is defective.
4. your transmitter is programmed in such way that it requires a "go ahead" signal to start transmitting; i.e. you have enabled dataflow control (either by hardware DTR/DSR/CTS/RTS or by software CTRL/Q or equivalent), and the target (or the cable) is not providing the go ahead.
etc.
There are two ways to get this solved:
1. accurate observations, using voltmeter, oscilloscope, whatever it takes to get real facts.
2. using redundant equipment: have a short null-modem cable and let this PC talk to another one
(use HyperTerminal), to verify the port transmits at all. Then include your current cable. etc.
|
|
|
|
|
What kind of device are you connecting to? If its another PC you need a null modem cable that swaps Rx and Tx, and ties RTS to CTS (assuming you are using handshaking) and depending on your target hardware asserts DCD/DSR, etc.
If you haven't gotten this working yet and you need more help, please provide some more details.
|
|
|
|
|
Hello
I need to know when any application going to use USB webcam and grab video. Any idea how I can do this? service\driver\UVC extension\messages\etc ?
|
|
|
|
|
It has two banks, one with a 512MB module in it and the other is empty. I'm pretty sure that I could put another 512MB module in the other bank, but I'd really like to put a 1GB module in both banks. I just don't know if the machine would support it. It's a "generic" machine so how can I tell?
Thanks.
DC
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi!
Short answer: In reality, without knowing the exact motherboard and rev, and possible processor (AMDs have DRAM controller internal), no one can say with 100% certainty!
Sorry, anyone that tells you otherwise likely isn't a hardware engineer (like me), has never done high-speed DRAM design (like me), has never done a high-speed signal integrity intensive design (like me), and/or has never used $$$$ signal integrity tools (like me).
In reality, every DRAM module model number is different! That includes speed and module Rev number. All motherboards list tested/approved DRAM modules, the capacities, the speed, the module part number. In reality, without that info, it is a total CR*P SHOOT!!
Some capacities may and may not work. Some speeds may and may not work. And, if it's an older motherboard, good luck finding those specific part numbers!
There are many real life issues with DRAM modules. They all differ in capacitance, trace length, trace matching, impedance differences (trace to trace), etc. And, every DRAM has different (but "very close") specs - even for the same speed/size/etc. There are hold time, setup time, capacitance, tolerance of termination, etc issues.
In general, you can likely put in 1GB DRAM module in each. As long as they are the same speed grade as your current 512MB module(s). Your best bet would be to go with name brand modules that support faster access times. BUT, there is a "decent" chance that you may have to tweak your BIOS settings to lower the DRAM access speed, and/or lengthen the accesses.
Consider it like speeding on the highway during a holiday. You know there are speed traps. But, still, "most/many" people can speed and not get caught. Same with doing a DRAM upgrade without going by the Manufacture's manual.
BTW: I very very strongly suggest that you do a disk image before you try out a DRAM upgrade. However again, many people speed during the holidays, they don't have radar detectors, and they don't get tickets. Just because something is foolish, doesn't mean that people don't do it, and not get screwed. For me, I avoid doing foolish things if I know they are foolish beforehand.
Wish I could be of more help. Oh well. At least I can say "it won't be a massive loss of money if it doesn't work". (And, of course, you first did a disk image.)
Good Luck!
_____
Joe
Principal Hardware/Software Engineer over a dozen years.
Hardware/Software? Huh? Today, the line keeps getting more and more murky.
BS: Comp Sci Engr/Elec Engr ; minor Mech Engr.
MS: Comp Engr.
modified on Sunday, August 23, 2009 6:33 PM
|
|
|
|
|
You could try to use hardware diagnosis software to find out the manufacturer and model of the board, then look that one up on the web.
Cheers,
Sebastian
--
"If it was two men, the non-driver would have challenged the driver to simply crash through the gates. The macho image thing, you know." - Marc Clifton
|
|
|
|
|
Download CPU-ID. It is a program that can tell you alot about your computer, including motherboard, memory, and memory timings.
The post you got from mustang86 was WAY overkill in how hard it is to find memory upgrades. If it is an older computer, yes is it harder, but umless you are looking for 72-pin SDRAM, you should be fine.
Also, memory upgrades, in my experience (I've done thousands), doesn't cause data corruption issues. The only thing is if you get memory with the wrong timings, your system will be unstable, something I am sure you do not want.
Basically, use CPU-ID to get your motherboard model number, Google that to find max RAM, and memory timing numbers. Then, I would suggest using an online store to find the memory that you find will work.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Expert Coming wrote:
The post you got from mustang86 was WAY overkill in how hard it is to find memory upgrades.
I figured that out after the second sentence.
Expert Coming wrote: Also, memory upgrades, in my experience (I've done thousands), doesn't cause data corruption issues.
I've never lost data due to inserting bad/wrong memory. At worst, the computer just failed to boot.
The 512MB module that is currently in it is from Kingston so I have all of the important numbers. The key is just to determine if the mobo maxes out at 1 or 2GB. I'll locate the mobo's make/model (hopefully) this evening.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Kingston has a memory configurator on their homepage that will tell you what/how much memory and combinations thereof you can use on your MB.
Your task is to find out make and model...
|
|
|
|
|
Crucial has a Scanner[^] that will examine your system to figure out what sort of memory it can take. Since they guarantee compatibility if you scan and order from them directly I'd think it's more or less universally trustable.
The latest nation. Procrastination.
|
|
|
|
|
Hi everyone.
Am currently tasked with a responsibility of developing a small application to monitor and log all printing jobs in an a Internet cafe.the application should be able to do the following:-
-when a user sends a print command,information such as the number of pages (sent for printing and those successful printed) and document name user intends to print should be captured and stored in a database.
-the name of the computer from which the job is sent should be captured
In case the printer prints less pages as intended by user,the system should be able to get the reason why it printed less pages (maybe printer running out of papers,or process cancel led by user)
The problem is that i don't know where to start from.Any helpful information(ie tutorials and suggestions) is highly appreciated.
THANKS IN ADVANCE.
Pascal
|
|
|
|
|
|
THANKS SO MUCH IT GAVE ME A STARTING POINT.
I TRIED TO RUN IT BUT COULD NOT WORK.
-WHEN SHOULD I RUN THE FORM(WHEN I SEND SOME JOB TO PRINTER OR BEFORE) AND
-SHOULD THIS APPLICATION BE RUN FROM THE COMPUTER WHICH IS PHYSICALLY CONNECTED TO THE PRINTER?
-ARE THERE CHANGES I NEED TO MAKE TO CUSTOMIZE THE APPLICATION IN ORDER TO SUITE MY REQUIREMENTS?
ANY HELP IS APPRECIATED.THANKING YOU IN ADVANCE
|
|
|
|
|