20101110
LINQ Confidential
20100801
MSP430 Launchpad - Low Power Thermometer Code
Like I said, I am new at this, and has been at least 8 years since I have even looked at anything that was in a base language so I am certain I have made some mistakes. If you see some let me know.
I don't claim to understand all of this perfectly yet. Why you need a sleep mode to read the ADC, or what all the ADC flags actually mean are a bit unclear. Those portions are taken from TI examples.
// I am new at this - it likely has bad errors
//
// the goal was to sleep as long as possible, read temp
// then display it through flashing the launchpad leds
//
// when not flashing or measuring go to the lowest power reasonable
//
#include "msp430x20x2.h"
//unsigned short cc = 65470; //longest CCR0
//unsigned short cc = 1000; //debugging CCR0 value
unsigned short cc = 10000; //interval between tests - CCR0 value
long IntDegF;
//this is all setup
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
BCSCTL3 |= LFXT1S_2; // make clock work without crystal
P1DIR |= 65; // P1.0 & 6 output
P1OUT = 65; // lights on so we know we are started
CCTL0 = CCIE; // CCR0 interrupt enabled
CCR0 = cc; // set the long interval
TACTL = TASSEL_1 + MC_1 + ID_3 ; // SMCLK, upmode, / 8
_BIS_SR(LPM3_bits + GIE); // Enter LPM3 w/ interrupt
}
//this captures the temp value
void dotemp(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
ADC10CTL1 = INCH_10 + ADC10DIV_3; // Temp Sensor ADC10CLK/4
ADC10CTL0 = SREF_1 + ADC10SHT_3 + REFON + ADC10ON + ADC10IE;
ADC10CTL0 |= ENC + ADC10SC; // Sampling and conversion start
__bis_SR_register(CPUOFF + GIE); // LPM0 with interrupts enabled
// oF = ((A10/1024)*1500mV)-923mV)*1/1.97mV = A10*761/1024 - 468
long temp = ADC10MEM; // raw adc temp
IntDegF = ((temp - 630) * 761) / 1024;
CCR0 = 999; // set short interval for display
}
// ADC10 interrupt service routine - I don't entirely understand the need here
#pragma vector=ADC10_VECTOR
__interrupt void ADC10_ISR (void)
{
__bic_SR_register_on_exit(CPUOFF); // Clear CPUOFF bit from 0(SR)
}
// Timer A0 interrupt service routine - this is the main flow control
#pragma vector=TIMERA0_VECTOR
__interrupt void Timer_A (void)
{
if (CCR0<1000) //if we are on the short interval we are blinking
if (P1OUT > 0) //if the leds are on turn them off
{
P1OUT = 0;
CCR0 = 600;
}
else //time to count down
if (IntDegF == 0) //if we have counted to zero back to the long count
CCR0 = cc;
else
{
CCR0 = 100;
if (IntDegF > 9) //if there are more than 10 left use the first led
{
P1OUT = 1; //first led on
IntDegF -= 10; //decrement 10
}
else
{
P1OUT = 64; //less than ten, second led
IntDegF -= 1; //decrement one
}
}
else
dotemp(); //do the temp measure
}
20100410
Dokan
If you are a linux user this is not a really difficult thing, but in windows land there has not been a really approachable way to do this without getting down into the weeds with some C driver development tools.
This is where Dokan comes in.
Dokan gives you a driver that handles all of the ugly low level bits and lets you develop the functionality you need in a higher level language. I have been playing with it for the last few days and by what I have seen so far, I think I would have killed someone to have this a couple of jobs ago when I was dealing with insane amounts of jpeg images all the time.
20100316
Win Phone 7 Ditches Multitasking, Memory Cards
Shared by Bill
and cutting off memory cards... are they stupid?
LAS VEGAS – The new Windows Phone 7 platform will avoid multitasking third-party apps, nix support for user-replaceable memory cards, and demand that all apps be installed from Windows Phone Marketplace, a Microsoft executive said Monday. Charlie Kindel, who is in charge of Microsoft's Windows Phone developer strategy, described a much more controlled, iPhone-like experience for formerly freewheeling Microsoft in an interview at the MIX10 conference here. Microsoft needed to exercise some control to provide a great set of consumer experiences, Kindel said. And notice that word "consumer" – Microsoft isn't offering much to enterprise IT folks with this release of Windows Phone 7. This is a consumer device. Like the iPhone, Windows Phone 7 won't support third-party apps being able to run in the background. But third parties will get access to a wider range of services than are available on the iPhone. For instance, Pandora could stream in the background using a special background-music service, Kindel said. But VoIP apps will be limited; there won't be a service to allow third-party apps to access telephony in the background. Microsoft doesn't have anything against background processing – they just need to find a way to do it that doesn't kill responsiveness and battery life. They're still working on the issue, Kindel said. "Apps that run arbitrarily in the background create an end user experience where battery life and responsiveness of the system becomes … inconsistent," Kindel said. "We focused on getting a set of experiences right where we didn't have to support [multitasking,] but we will over time." Those third-party apps will all have to be installed from Microsoft's own Marketplace, Kindel said. Initially, there won't even be a way for enterprise customers to deploy apps to their staffs, but Microsoft is working on one. Microsoft may sweeten the deal for developers with lower fees to submit apps to the Marketplace, but the details haven't been worked out. "We are revamping a lot of the marketplace policies, [and] we have a real desire to make sure that for developers, getting started is cheap and easy," Kindel said. Windows Phone 7s won't support user-replaceable memory cards, Kindel said. Microsoft will work with OEMs to make sure that phones have enough storage for media and 3D games, but there will be no MicroSD cards for your music. Some phones could have a MicroSD locked under the battery, but it won't be user-replaceable. Kindel refused to confirm whether or not any future Windows Mobile 6.5 phones would be upgradeable to Windows Phone 7, saying Microsoft was focusing on the new platform, but he said that developers aren't crying over the transition. Rather, they're thrilled with the ease of use and power of the new Windows Phone 7 developer tools, he said. "When I talk about the fact that we're breaking backwards compatibility, I get applause," he said. The first Windows Phone 7 devices will come out during "the holidays" of 2010, Kindel confirmed. |
20100315
Official announcements from Microsoft about Windows Phone 7 Series from MIX10 !!!
So, here it goes:
- free developer tools for making XNA and Silverlight apps for Windows Phone 7 Series = .NET-only development what means: source code of these apps can be easily decoded
- several partners announced that will be making apps for Windows Phone 7 Series, including EA Mobile - the huge game maker, and also Microsoft's own Microsoft Game Studios
- Silverlight apps running in Windows Phone 7 Series have access to accelerometer, camera, microphone, multitouch
- Windows Phone 7 Series Emulator will be included with tools too, but not clear when it will be available
- Marketplace for Windows Phone 7 Series apps announced
SOURCE
French village went insane after CIA spiked its bread with LSD
One man tried to drown himself, screaming that his belly was being eaten by snakes. An 11-year-old tried to strangle his grandmother. Another man shouted: "I am a plane", before jumping out of a second-floor window, breaking his legs. He then got up and carried on for 50 yards. Another saw his heart escaping through his feet and begged a doctor to put it back. Many were taken to the local asylum in strait jackets...French bread spiked with LSD in CIA experiment (Thanks, Steve and everyone else who suggested this!)Scientists at Fort Detrick told him that agents had sprayed LSD into the air and also contaminated "local foot products".
Mr Albarelli said the real "smoking gun" was a White House document sent to members of the Rockefeller Commission formed in 1975 to investigate CIA abuses. It contained the names of a number of French nationals who had been secretly employed by the CIA and made direct reference to the "Pont St. Esprit incident." In its quest to research LSD as an offensive weapon, Mr Albarelli claims, the US army also drugged over 5,700 unwitting American servicemen between 1953 and 1965.
(Image: Shaw's French Bread, a Creative Commons Attribution photo from Adam Pieniazek's photostream)
http://bit.ly/ag3jDi
20100314
ASP.NET MVC 2 Released
ASP.NET MVC 2 is out. This means, it's released. It's final. Use it. Love it.
You can download it directly, or install it (and whatever else you like) with the Web Platform Installer:
ScottGu has many details in his post. There's lots of resources to check out:
- What's new in ASP.NET MVC Whitepaper
- ASP.NET MVC 2 adds a bunch of new capabilities and features. ScottGu has a blog series about some of the new features, and will be covering them in more depth in the weeks ahead. Some of the new features and capabilities include:
- New Strongly Typed HTML Helpers
- Enhanced Model Validation support across both server and client
- Auto-Scaffold UI Helpers with Template Customization
- Support for splitting up large applications into “Areas”
- Asynchronous Controllers support that enables long running tasks in parallel
- Support for rendering sub-sections of a page/site using Html.RenderAction
- Lots of new helper functions, utilities, and API enhancements
- Improved Visual Studio tooling support
- ASP.NET MVC 2 adds a bunch of new capabilities and features. ScottGu has a blog series about some of the new features, and will be covering them in more depth in the weeks ahead. Some of the new features and capabilities include:
- Upgrading an ASP.NET MVC 1.0 Application to ASP.NET MVC 2
- ASP.NET MVC 2 Content Map on MSDN
- ASP.NET MVC 2 Code Sample Downloads on MSDN
If you have questions or problems with any of the samples, please post your comments on the MVC Forum
- MVC AJAX Application Download
- MVC Areas Application Download
- MVC Asynchronous Controller Download
- MVC Basic Walkthrough Download
- MVC Controller Download
- MVC Data Views Download
- Using the Templated Helpers to Display, Edit and Label Data Download
- Validating Model Data Using DataAnnotations Attributes Download
Enjoy!
© 2010 Scott Hanselman. All rights reserved.
20100311
1024-bit RSA encryption cracked by carefully starving CPU of electricity
1024-bit RSA encryption cracked by carefully starving CPU of electricity originally appeared on Engadget on Tue, 09 Mar 2010 02:47:00 EST. Please see our terms for use of feeds.
Permalink The Register, TechWorld | University of Michigan | Email this | Comments http://bit.ly/aCec9720100306
Kohctpyktop: a game for engineers
Kohctpyktop: engineer of the people, by Zachtronics Industries is the first game where you have to design integrated circuits as a challenge. You play the role of an chip designer and you have to design chips using metal, n and p dopped silicon. Check it out. [via]
Kohctpyktop: a game for engineers - [Link]
http://bit.ly/9o15mu20100303
20100223
hrmageddon: is this how mergers should be done?
I’ve been a cubicle dweller several times, although all of them short-lived. Corporate vets may be more amused at Thup Games’ HRmageddon, a Flash game which puts the gore in merger. What? Anyway. HRmageddon’s “story” starts when your company, Gray Solutions, merges with Beige Dynamics. The problem? The number of openings remain the same, but the number of employees have doubled. The higher ups’ solution, delivered to you via an attached PowerPoint presentation:
Battles take place tactics-style. To win, you must kill all of the rival employees, or capture more cubicles than the opposing team. Employees consist of managers, receptionists, IT guys and salesmen, with varying specialties and attack ranges. Before each battle, you choose which of these employees and how many of each type to hire, as long as you spend within the budget. There are power ups on the field too, all of them office related as well, e.g. “Holiday Bonus”, which heals a unit and bestows a temporary attack bonus.
The game is kinda slow-paced, but the animations made me stick with it, especially the salesman’s attacks and the manager’s moves. Check out the HRmageddon at Adult Swim. While you’re there, be a kind soul and check out My Lil’ Bastard for me won’t you? I wanted to play it but I didn’t have the time. And also Robot Unicorn Attack; and Dungeons and Dungeons; and Death Vegas.
http://bit.ly/cfDxnE20100221
Windows Mobile 6.5.x Development to Continue Longer Than Expected?
Related Posts
- Update: Microsoft and Nokia to Continue to Compete and Collaborate
- Nokia to Introduce New C-Series Devices on January 26th?
- Review - Windows Mobile 6.5 Professional
20100219
Make Sure You're Not De-Motivating Your Team [Career]
It should come as no surprise that money is a pretty powerful motivator for workers, but an article by researchers at Harvard Business School says it takes more than cash to keep employees happy and productive.
Photo by crschmidt.
The article suggests that managers spend too much time trying to figure out how to motivate employees—something most workers are perfectly capable of doing themselves. Instead, team leaders need to get out of the way and stop de-motivating employees with mindless policies and poor management strategies.
The authors say people have three main goals at work: 1) to be treated with respect and equity, 2) to take pride in a job well done, and 3) to have good relationships with fellow employees. If even one of these factors are missing, workers are three times as likely to be unhappy at work. Surprisingly, not even a better paycheck will make up for the loss of one of the three biggest motivators.
Inane company policies and procedures often do the most damage to employee motivation, and there's often little middle managers can do about it:
Satisfying the three goals depends both on organizational policies and on the everyday practices of individual managers. If the company has a solid approach to talent management, a bad manager can undermine it in his unit. On the flip side, smart and empathetic managers can overcome a great deal of corporate mismanagement while creating enthusiasm and commitment within their units. While individual managers can't control all leadership decisions, they can still have a profound influence on employee motivation.
The most important thing is to provide employees with a sense of security, one in which they do not fear that their jobs will be in jeopardy if their performance is not perfect and one in which layoffs are considered an extreme last resort, not just another option for dealing with hard times.
Check out the article for a list of ways managers can help workers achieve their goals, feel a sense of pride in their work, and build camaraderie with fellow workers. What keeps you motivated at work? Is it the companionship of your colleagues, cold, hard, cash, or something else? Share what revs your motivational motor in the comments.
http://bit.ly/drZqJc
Firefox Feedly RSS option
If you use Firefox with a RSS button and want the default RSS page to offer a Feedly option here is what you need to do: go to the about:c...
-
Ever get stuck between two API and have to keep converting between two almost identical sets of data objects because neither API can be modd...
-
In a former life I directed and produced television commercials. I quit and then edited news for a while as I tried to figure o...