For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
I'm not sure about how to simulate one, but I remember using the standard PC keyboard interrupt to trigger events in a C++ (state machine) program assignment I wrote. My lecturer just loaded it onto his PC with all his work on it to try it out and it worked and importantly then returned normal function to the keyboard interrupt I'd used - Interrupt 9. I used a book 'The undocumented PC for information which is/was very good for this sort of stuff.
As you mention a USB device, try looking at devices that provide Inputs and Outputs - they often have one or more inputs that can be set to trigger an interrupt when their input state is changed - by say a switch. I've used mostly internal PC I/O cards which can trigger interrupts but also USB devices which provide the same functionality. Serial Port connected devices also have/had this functionality - even if your PC may no longer have a 9 pin serial port.
I'm developing an application in vxworks. In this application I use uart in polling mode for reading and writing.
The problem is that when I disable uart interrupt using "intDisable" command, uart generally does not work in polling mode.
The question is whether this is normal? Why uart does not work in polling mode if I disable it's interrupts.
Up front, I apologize if this is not exactly code related , but I am stuck. I am trying to resurrect my Win7 from image. From Win7 setup disk I select “restore from last image / backup”. The restore app identifies the internal SATA drive and lets me select it for restoration. So it knows the drive exists. The resoration process suppose to format the drive, it does not. and the restoration fails and the only option is to “download HD driver”. My XP PC does not use SATA so I cannot let helpful folks scan my PC for this particular drive. I have been unable to find JUST the driver, but I keep looking. The catch is – Win 7 opens \System32 when I try to find the suitable driver. So my basic questions - if the restore apps knows the type of the drive , where in the \System32 is the driver located? If it is there why can the restore app find it for me? Is there any other way to restore the image to the internal drive ON DEAD PC? And reasonable suggestions would be appreciated. Cheers Vaclav PS I have not found answers Googling.
I'm trying to head off an IT inflicted disaster. IT wants to move the s/w team I am on to a new machine. They desperately need to do this, and I'm not arguing. However, the LAST time they moved a lot of our files (backup development zip files for example), the transfer (xcopy) corrupted them. It wasn't until a year later when I needed the old code the problem was discovered.
So, alternatives to xcopy? I'm sure there must be something better out there that will do a binary check for a good copy...
Anything else I should fear?
Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house.
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Yes, anyone can learn how to create a printer driver.
If you want to know how, it would take an entire book to describe. That's not something you're going to learn from a couple of forum posts. You've been told where to start, and, yes, there are books out there that will teach you how to create drivers.
I am currently using a dsPIC33FJ128MC802 [^] on a DM300027[^] (starter) board to read data from the ADAS1000[^] evaluation board (for ECG) via the J4 SPI pins. I have the SPI pins (SCLK, MOSI, MISO and CS) of both boards connected correctly according to the ADAS1k documentation.
I am having trouble getting the two (ADAS1k and dsPIC) to talk to each other. I set up the uProc's SPI and then tried to configure the ADAS1k by sending based on an example in the ADAS1000 documentation.
These commands should configure the ADAS1k to send out a 150Hz Test Tone Sine Wave on each channel.
The MOSI is enveloped by a CS, and it is sent as 4 bytes, for example 0x8500000B is sent as 0x85 followed by 0x00, 0x00, 0x0B.
To read data on the MISO, the SPI sends out four 0x00 bytes to generate clock signals for the MISO.
Writing 0x55555555 followed by 0xAAAAAAAA shows a signal on the MISO, which looks like a 0x0050. I haven't been able to get signals on MISO in other cases. I tried writing to a register and reading it back after a few ms delay, but nothing showed up on the MISO.
I've captured the scope of the SPI (MOSI, SCLK and CS) signals on both boards and they seem to be fine. The MOSI signal seems as expected. I'm still unable to see anything on MISO though.
Any suggestions on what else I can do to troubleshoot this issue? Thank you.
Based on sorting out other busses e.g. I2C, CAN I'd recommend:
Build in, or use, some logging facility to record what's happening on each chip, even if its only a count or letter stored to show where you're code is going.
Use a USB to SPI converter or something you know works to prove each work individually - it's much easier when one end is a 'known' rather than with and 'unknown' at each end of the wire.
Read the manuals on the chips and on the SPI bus - I know it's obvious, but chip manuals tend to focus on how the chip works - not on the bus. Get the manual on the bus protocol.
Have someone else look at it and show them, OK perhaps you wouldn't be posting here if you could do that but it really helps. I saw someone debug for days without turning power on to a stepper motor he was trying to step.
Try and scope the interaction signals, and work through them, after all there should show exactly what's happening: which chip is not responding or signalling as expected.
Don't handle just the happy path, handle the error cases as well - e.g. set timeouts and set sone code to log if the time out occurs even if its just to log what the error was.
I took out my 5 years old laptop to re-install and give it to my daughter.
As she's working with Windows in the school I intend to install Windows 7 (Professional).
As the laptop has 4 GB memory I'm not sure what would be better, install 32 bit and loose some memory range or install 64 bit and loose - maybe - some performance?
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).