April 2009 Archives

CANbus timings on Microchip 18F processors

| No Comments | No TrackBacks
We've been using Microchip's 18F2580 and 18F4580 processors for most of our CAN projects.  They are readily available and have the CAN protocol module already on board.  Connect the processor to an Automotive CAN transceiver like the NXP PCA82C251 and you have a quick solution.    I was forced into using CAN when we built a replacement PCM for REVOLT's Mazda 3 project and have become a convert.  CAN is pretty easy to use, and seems to work quite well even in very noisy environments. 

The biggest challenge of using CAN is getting all of the timings right for the bus speed you are using.  There are a couple registers that have to be set just right.  In Microchip this is the BRP (Baud Rate Prescaler), SYNC, PHSEG1 and PHSEG2, and PROPSEG.  The latter values are summed to find out how many (scaled) clock cycles makes one bit.  For some reason Microchip likes giving all of its equations backwards.  The equations explain how to calculate the bus speed based on the register values.  Most designers want the other way, they know the bus speed they want, and need to solve for the register values.  Its a pain.

The good news is other people have suffered the same pain, and some of them wrote tools to help with the calculations.  The best I've found for CAN so far is from Intrepid Control Systems.  Their Microchip Controller Area Network (CAN) Bit Timing Calculator makes it easy. Give it the clock speed and CANbus speed and it will show you all of the possible BRP values.  Then it will show you what values to fill in for the remaining registers for each possible BRP value. 

Another Disaster Recovery Plan Tip

| No Comments | No TrackBacks
Here's one that should be in everyone's Disaster Recovery Plan/Operations Manual:  What to do and whom to call when the government shows up with a search and seizure warrant.

Because of the confiscation of computers at Core IP Networks, a number of legitimate businesses have been affected.

From the downtown office building in the 2300 block of Bryan Street, FBI agents seized what one source described as millions of dollars in computer equipment.

Matthew Simpson, the owner of Core IP Networks, said in a letter posted online that FBI agents raided two floors and 'pulled the plug' on his clients' web servers starting at 6 o'clock Thursday morning. Agents also raided Simpson's house in Ovilla.
Link

If you are a co-location or managed services customer and uptime is important to you, don't put all your eggs in one datacenter, and have a good plan on how to fail over.  No matter how redundant or what Tier your datacenter provider offers, outages at the datacenter level still happen.

My advice (INAL, and I know nothing about the legal issues)... If you are providing a shared resource to customers, either datacenter space, bandwidth services or shared hosting have a plan for dealing with search warrents.  It seems most will be polite requests during business hours but some may not.  You don't want your on-site tech trying to decide if he should allow the police in the door.  Make sure Operations has on call access to Legal, or knows someone high enough who can reach legal services in time.   

On another note...I do hope Simpson is not the focus of the investigation solely because his name is on the IP allocation.

Cookies a' rising

| No Comments | No TrackBacks
Looking back at my posts so far, it doesn't seem like I've settled on any particular topic for my blog.  So I'll stick to telling what I learned yesterday.

Try using Baking Powder instead of Baking Soda in the standard Toll House cookie recipe.  The cookies end up puffier and don't seem to spread out as much.  Don't try substituting white sugar for some or all of the brown sugar.  The brown sugar helps the flavor a lot. 

My wife took some pictures and video of my son trying to help.

About this Archive

This page is an archive of entries from April 2009 listed from newest to oldest.

March 2009 is the previous archive.

June 2009 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.24-en