|
fat_boy wrote: Ha, thats a good way of saying it. Its massive, but also never gives you a absoloute answer, probably because Microsoft dont know how it works either!
The most problematic though is the ability of Windows to go into strange parts of ite 'envelope' and start acting weird. Much of the challenge if kernel deving is to keeop Windows as close to the center of its possible field of states. We call it a nondeterministic infinite state machine. Its due to its sheer complexity, and hence architectural bugs can arrise easilly, and the fact that HW is so very different from platform to platform nd can have a massive effect on the Way the kernel functions.
I like your idea, a nondeterministic infinite state machine!
John
|
|
|
|
|
It was coined by a colleague I worked with a few years back, and so well defined windows it stuck in my mind. Its the complete antithesis of what a computer should be.
Morality is indistinguishable from social proscription
|
|
|
|
|
i built a seial programmer to the atmega32 found in this link :
http://ballwell.blogspot.com/2009/08/serial-programmer-for-avr.html
i am trying to test it using ponyprog , but unfortunately when i open the setup interface i get "Test Failed"
i am searching for any error but i cant find
thnx for any help
modified on Thursday, September 2, 2010 7:12 PM
|
|
|
|
|
your link seems incorrect.
|
|
|
|
|
sorry for mistake , i corrected the link
|
|
|
|
|
OK, I skimmed that blog, so I think I understand what you are trying.
There is insufficient information (symptoms) to help you out, anything could be wrong (no power, wrong serial port, bad cable, no target device, ...). Has it ever worked for you?
I'm unfamiliar with ponyprog, I don't know what conditions would lead to "Test Failed" (and what other messages could be generated).
Your best bet could be to post on a specialized forum, is there one for ponyprog? or contact ballwell.
If all that fails, post here again, with tons of information of what you did, what works, what doesn't.
BTW: I regret the little PCB does not offer any LEDs, it is always good to have some immediate indicators.
|
|
|
|
|
please can you explain me in brief wat you are trying to do so i can help you out i have worked little on avr microcontroller building bots....i mean robot
|
|
|
|
|
Is it like this?
when reading/writing a file, if there are APC's, the reading/writing returns immediately and prematurely, and the APC's
are executed.
|
|
|
|
|
Thats a good question, and not documented that clearly, but it seems (and I havent personally dug into this functionality to that extent) that the calling thread is notified if there is an outstanding IRP on the devobj and can then decide to terminate or not the operarion. This is from the DDK:
"When I/O is synchronous, each I/O operation must wait for the preceding operation to complete before it begins. With the FILE_SYNCHRONOUS_IO_ALERT operation, waiting threads are alerted to the delay and can terminate the operation."
All IRPs will be synchronous, each having to complete before the other can start. You will probably get a STATUS_PENDING from ZwWriteFile() for example. Is this what you get?
Morality is indistinguishable from social proscription
|
|
|
|
|
Just saw your last post, if you are in user mode why call ZwCreateFile(), surely its easier to call CreateFile() since much of this work will be done for you.
Morality is indistinguishable from social proscription
|
|
|
|
|
i bought a usb to rs232 converter and i tested it using loopback and hyperterminal and it is working
but i can't know the values of logic 1 and logic 0 , is it 0 to 5 volts or what !!
i mean do i need MAX232 to connect it to an AVR micro ?
|
|
|
|
|
RS232C is a standard that specifies different aspects of the serial interface, including voltage levels. Microprocessors don't give those voltages (and don't require the corresponding supply voltages either), so yes you typically need a level converter (MAX232 is a popular possibility).
You should learn to use Google, and look for:
- the RS232C specifications;
- the datasheets for the components you intend to use;
- some relevant articles (CodeProject has at least 3 articles mentioning MAX232).
Warning: if you make a mistake, you're likely to damage one or more of the parts involved. So it is very wise to do first experiments with a part that is easily replaced, such as your USB-to-RS232C cable or a plug-in card in a desktop computer, and NOT with a serial port on the motherboard.
|
|
|
|
|
i understand what u say but i am a bit confused
i think that USB uses voltage levels (0-5v) , how it is supposed to get the levels of RS232 (in the USB to RS232 cable) without external power source
thnx for caring
|
|
|
|
|
While the original RS232 spec called for voltages of around 12 to 18V, modern implementations are almost exclusively 5 volt designs. The USB standard provides for each port to deliver a small amount of 5 volt power to connected devices, which is what makes possible many popular USB devices, including your RS232 converter. The key word is "small" however, and USB does not provide enough power to deliver a serial connection very far.
Driving a cable requires the ability to source and sink a fair amount of current, primarily because the cable "looks like" a capacitor that must be charged and discharged for every change of state. Microprocessors like the AVR are built mainly using CMOS technology, which cannot source or sink much current, so external bipolar circuits are almost always required. Special circuits like the MAX232 require very little input current, and so can be driven by a micro directly, but they can move larger currents on the RS232 side. Depending on what form your AVR takes (bare processor, development board, custom circuitry) you may or may not need this extra buffering. Check the documentation for what you have to work with. If it specifies a serial port without mentioning RS232, you can be fairly sure that you need to provide this extra circuit for the connection to the outside world.
Will Rogers never met me.
|
|
|
|
|
Although RS232C requires both positive and negative voltage levels, neither a microprocessor (with the addition of an external device such as MAX232) nor any other chip will have great difficulty in conforming to the specification.
All USB-to-RS232C cables I've seen (quite a few actually) were OK. If you have to worry, it is about your peripheral, assuming you would venture to design and build one yourself.
The (MAX232) drivers provide RS-232 voltage level outputs (approx. ± 7.5 V) from a single + 5 V supply via on-chip charge pumps and external capacitors. That is what one source of information has on the subject.
End of story. The sequel is on Google.
|
|
|
|
|
Most logic is active low, so logic 1 is 0 volts. I am not saying it is like this for RS232, its been a long time since I touched it and I cant be bothered to google it.
You can easilly see, stick an oscilliscope on the data wires and see what they are reading when its idle.
Morality is indistinguishable from social proscription
|
|
|
|
|
|
Thats why I said I wasnt saying RS232 is like this, but its common of circuits to have active low logic. And he did ask about the logic.
I thought RS 234 was the differential one alowing long cable lengths? Could be wrong though. Its been a while.
Morality is indistinguishable from social proscription
|
|
|
|
|
RS485 is differential, using two signal lines of opposite polarity. RS232 uses one line, but uses +V and -V for logic levels.
Will Rogers never met me.
|
|
|
|
|
|
I want to practise writing win32 ddk drivers.
Need some hardware, cheap and interesting. Any suggestion?
Thanks in advance.
BTW, I had posted many times until it was posted successfully, is it the problem of the forum?
|
|
|
|
|
Try eBay or any of the discount resellers in your locality.
It's time for a new signature.
|
|
|
|
|
|
The explanation in msdn is too brief to me.
FILE_SYNCHRONOUS_IO_ALERT
All operations on the file are performed synchronously. Any wait on behalf of the caller is subject to premature termination from alerts. This flag also causes the I/O system to maintain the file-position pointer. If this flag is set, the SYNCHRONIZE flag must be set in the DesiredAccess parameter.
Any wait? For example, when WaitForSingleObjectEx's bAlertable is FALSE ?
In fact, I'm not clear about the concepts. Does it mean that ZwReadFile/ZwWriteFile (in synchronous mode) will
returned prematurely when there are APC's?
modified on Sunday, August 29, 2010 8:08 PM
|
|
|
|
|
i wrote a small code to test the ADC in atmega16 , the code doesn't contain errors but i tried to simulate the code on proteus and it doesn't work
here is the link for the code and proteus file i used to simulate
http://uploading.com/files/cb852548/adc.rar/
it is very simple but it doesn't work
i wish anybody can help ,
thnx in advance .
|
|
|
|