|
Respected sir:
I am involving in a program which is written by myself about using MSP430F149 to control the step motor.I would like to show them here.( this is the datasheet of MSP430F149: [^]
)And I think maybe they could be improved but I don’t know how to do it. Could you give me some suggestions?
This is the program:
<#include <msp430x14x.h>
typedef unsigned int uint;
typedef unsigned char uchar;
#define PWM BIT2
void int_clk()
{
uchar i;
BCSCTL1&=~XT2OFF; //open XT oscillator
BCSCTL2|=SELM1+SELS;//MCLK 8M and SMCLK 1M
do
{
IFG1 &= ~OFIFG; //clean the wrong sign of vibration
for(i = 0; i < 100; i++)
_NOP(); //delay waiting
}
while ((IFG1 & OFIFG) != 0); //If sign is 1,continue to wait
IFG1&=~OFIFG;
}
void int_pwm()
{
P1SEL|=PWM;//choose P12 to bePWM output
P1DIR|=PWM;
TACCR0=800;//PWM signal cycle 10KHz
TACCR1=400;//duty cycle 1:1
TACCTL1=OUTMOD0+OUTMOD1+OUTMOD2; //outputted mode choosing
TACTL|=TASSEL1+MC0;
}
void main()
{
WDTCTL=WDTPW+WDTHOLD;//close watchdog
int_clk(); //clock initialization
int_pwm(); //initialize PWM
while(1);//end>
The program is base on controlling the return of step motor by using MSP4300f149. The outputted port of PWM is P1.2 while the signal cycle is 10KHZ. The duty cycle is 1:1.
Do you have any advice about my program?
Best wishes~
|
|
|
|
|
What kind of answer do you expect?
You are mainly setting configuration registers which can't be improved.
The only code portion that can be improved is the loop in your int_clk() function. The final clearing of the OFIFG bits can be omitted because those are already cleared when the loop terminates. The inner for loop seems to be unnecessary when _NOP() does what it indicates (just do nothing while the processor runs) and there is no requirement for a delay between consecutive writes to the IFG1 register.
Then that function can be:
void int_clk()
{
BCSCTL1&=~XT2OFF;
BCSCTL2|=SELM1+SELS;
do
{
IFG1 &= ~OFIFG;
}
while ((IFG1 & OFIFG) != 0);
}
|
|
|
|
|
Purely a question to understand what you get with the product.
The ADAS 1000 Evaluation board, with the SDP controller board, can display ECG traces on the PC program (looks like LabView). But my questions is, does it come with defaults and default program to connect and display. Forget whether it's safe to connect to humans or animals, which the disclaimer warns against. I'm Just wondering how useful it is.
Does it come with defaults and the ability to display proper ECG waveforms, if electrodes connected.
|
|
|
|
|
You'd do a lot better getting an answer from the supplier than from a random bunch of coders here.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
to do Kernel mode debugging can the host computer be windows 8.1 and target windows 10
thanks
|
|
|
|
|
Hi,
Yes... of course. You can attach a debugger to Windows 10 from Windows 7 or greater.
Best Wishes,
-David Delaune
|
|
|
|
|
|
Good morning~
I met some troubles about interrupting when programming the PIC18F87K22. This is the datasheet of PIC18F87K22:<url=<a href="http://www.kynix.com/uploadfiles/pdf65976/PIC18F87K22-I2fPT_606726.pdf">[^]> My situations are as following :
1). When using timer 3 to produce square ware (135Hz 270Hz),it require that the high need to compare first.I don’t know how to explain it clearly...
2)The receive of series port interrupted,the data that receiving host computer sent is <fs+9999>.
3)The INO is interrupted by surface.
4) The timer5 times about 1H.
5) Sometimes the numbers will lost when receiving data.However, it can’t lost when closing other interrupt.
Can you tell me how to solve this problems ?
Thank you very much.
Have a nice day~
|
|
|
|
|
My computer shop currently has 5 developers and we all are very frustrated with the performance of our workstations. We are trying to get management to go for some top-end workstations for blazing speed when we compile our applications in Visual Studio 2010 (yes we are behind) as well as fast speed with our SQL Server. We support one huge solution that takes 12 minutes to do a Rebuild-All on an i7 M620 (2 core) with 8GB RAM. That same solution takes 4 mins 10 secs on an i5 6500 (4 core) with 8GB of RAM.
We also would like to be able to build Virtual Machines on our workstations to create sandboxes for various development and pre-implementation tasks. There are a couple of build specs we are looking at requesting. Both are similar and only differ on CPU. I would like feedback on which we should go with and get best bang for the buck and achieve our blazing fast performance requirement. I will also mention that running BitLocker full disk encryption is a mandatory company requirement. We would love to get that build time down to 1 minute or less.
Build 1:
CPU: Intel I7 6900K (8 Core)
RAM: 32 GB DDR4
Primary HD: PCIe Solid State Drive (512GB)
Secondary HD: SATA Solid State Drive (500GB)
Build 2:
CPU: Intel i7 7700K (4 Core)
RAM: 32 GB DDR4
Primary HD: PCIe Solid State Drive (512GB)
Secondary HD: SATA Solid State Drive (500GB)
Installed Applications:
Visual Studio 2010
SQL Server 2008R2
BitLocker Full Disk Encryption
VMWare (Multiple VM Machines)
Possibly will try running RAM Drive for temp file usage in Visual Studio
Any feedback on these specs would be greatly appreciated? The managers that make the hardware purchase decisions for our organization says why do you need 32 GB of RAM, that's way over kill and you don't need that powerful of CPUs either.
Do you think 32 GB is overkill like our Hardware management is saying as push back? Do you agree that the i7 6900K or the 7700K is overkill for what I described as our goals? They are really pushing for the entire organization to use one model which is a very small footprint HP EliteDesk 800 mini with the i5 6500 and 8GB RAM. So we are lumped in with everyone else who just uses their computer for emails, spreadsheets and Word. Thoughts? Would you recommend something different as a Visual Studio Developer?
|
|
|
|
|
I just wanted to add one thought to speeding up your machines. If you can put two SSD's in a RAID 0 configuration, that will speed things up more than you can imagine.
And you yourself have found your argument against the "32 GB is overkill" point of view: They are lumping you in with people who need only minimal specs to get their job done.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
|
LovesCSharp wrote:
Do you think 32 GB is overkill like our Hardware management is saying as push back? Yes. I would also ask for an argumentation of "Hardware Management", just to see if it is a pushback.
I'm currently on a i3 (laptop cpu) with 16Gb; that may sound slow, but thanks to SSD it works quite speedy. Booting in seconds, launching VS in seconds. Good enough to Warcraft
LovesCSharp wrote:
Possibly will try running RAM Drive for temp file usage in Visual Studio
Doesn't bring much additional speed, unless your HD is really slow. With Windows memory management the entire ram-disk may be pushed into virtual memory if the system needs space. It also does not speed up compiling that much.
LovesCSharp wrote: The managers that make the hardware purchase decisions for our organization says why do you need 32 GB of RAM, that's way over kill and you don't need that powerful of CPUs either. Log the time that you are waiting for the compile to complete, and express that value in money (time * your costs). That way you have a financial argument, something that managers are sensitive to.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
You're welcome.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
LovesCSharp wrote: Do you think 32 GB is overkill like our Hardware management is saying as push back?
Yes.
It is unlikely that your Visual Studio project will utilize this much RAM. I have only encountered a few projects that utilize this much RAM... all of them were C++ solutions with 20+ projects/libs and the RAM was used only during the linking stage.
I would recommend Build 1 with only 16GB of RAM. More cores means faster compiling... and with SSD drives you get faster machine code generation on disk.
For running Virtual Machines... Build 1 is also vastly superior due to the large 20MB cpu cache versus the 8MB cache on the consumer processor.
They could save over $500 by avoiding the Intel I7 6900K and going for a lower-end Xeon 8 core processor with 20MB cache. There are dozens of them for under $500.
Best Wishes,
-David Delaune
|
|
|
|
|
good, Can you provide me with the <a href="http://123hpoj.com/6500-support.html">download link</a>?
|
|
|
|
|
You already have that URL so go there and take a look around. Alternatively, contact HP support.
|
|
|
|
|
Hi everybody!
I got a second-hand Pioneer DVR-K17A (a slim burner with IDE interface for my laptop) and I managed to dump the firmware in order to edit it.
I would like to increase the number of writable sectors in a DVD-5 by editing the hexadecimal code. Theoretically, in this way I would enable the overburning feature.
Using an hex editor, I even saw some interesting strings that could be suitable for being modified, but I need someone who perfectly knows this stuff.
I know this is just a minor tweak and I really like experimenting, since the burner's value is very low.
I could even upload the firmware file, if someone were interested.
So if someone has useful suggestions, please reply to this message, even just for recommending particular forums more focused on firmware modding of burners.
|
|
|
|
|
F9006 wrote: recommending particular forums Google will help you to find them.
|
|
|
|
|
Hi
Our team of university engineering postgrads has undertaken a challenge to create from scratch a computer-connected tactile matrix touch pad meant to let blind people sense with their fingers shapes others can see.
Whereas we will eventually need to get the programming job done by professionals, we would like to get a feel of what making a usb connected controller device live.
We would greatly appreciate advice pointing us to the relevant online resources with regards to the following:
- the choice of the programming language - how controllers are programmed these days and which frameworks (if that is the right word) are best to be used
- the path to making the chosen framework implementable in a newly designed device - at which stage of the controller design is it supposed to take place
Greetings
Tom
|
|
|
|
|
Member 9640444 wrote: the relevant online resources That's a job for Google.
|
|
|
|
|
Too easy for you guys? That's okay. I will do the research myself and would only ask for correcting me if I am wrong on something. I hope noone minds my using this thread as a note board and perhaps someone googling for similar information one day will find it useful.
Here is what I found overnight.
First of all, I was mistaken about python language. The key word here was "driver".
Windows will require a driver made using a Driver Development Kit to convert ascii sent by the device to the computer (this kind of programming may require putting windows into a virtual machine). The communication is actually going to be in two directions.
Now, I will need to find out how to make an electronic device capable of sending and receiving ascii.
Anyone, is that right so far?
|
|
|
|
|
Member 9640444 wrote: is that right so far? Probably yes, but you need to do the R & D yourself to find out whether it works for what you want. This is really not an easy question to answer since there are so many variables. People here will try to help you with specific questions, but we cannot second guess what might happen in a project that does not yet exist outside of your brain.
See How to get an answer to your question - Hardware & Devices Discussion Boards[^].
|
|
|
|
|
Of course, thanks Richard very much for your help.
Like I said, this is an initial phase, but we want to get an outlook of what will be there to be done even as the lab team are working on the mechanics of movement. Therefore, I hope you do not mind me using this forum to verify our team's findings and assumptions. Forums is place where many ideas can get combined into new ones - and one can not always predict what the outcome will be.
Thus, may I use the forum to ask some further questions to a broader public?
|
|
|
|
|
Member 9640444 wrote: may I use the forum to ask some further questions Of course, but as mentioned in the link I gave you, please try to make your questions specific and detailed. Vague questions tend only to get vague answers.
|
|
|
|