Skip navigation
COMPACT

VY Canis Majoris Part 09

Posted by COMPACT Top Member Mar 30, 2017

31ST JULY

More on the U7 voltage regulator

The XL_STAR schematic dated Monday 21st February 2011 does not contain any details of U7 (the IC that can get really hot).

From the picture in the XL_STAR Users Manual on page 9, U7 and C28 have replaced U2 and L4.

The left is the photo in the manual, on the right is a photo of my XL_STAR with the U7 alternative.

 

U2.jpg(waiting for the original photo to be restored)

 

U7 is marked with L048B but the closest device I've found is a National DP8345 but according to its data sheet it does not come in a SOT23-5 package. It'll be interesting to see what it is. (It's obvious that it is a 3.3 voltage regulator to replace the MC34727CFC!)

The MC34727CFC looked the perfect part with 3.3V 600mA power output with an input voltage range of 3.6-5.5V ensuring operation with a LIR/PD2450 battery. The battery wouldn't last too long pumping out the power for 600mA.

We're definitely heading towards technology of Star Wars and Star Trek.

 

 

Intel/Altera have tiny power supply modules that are so simple that anyone could use them.

Their EM2120H01QI for a lazy 1.3V - 5V @20A continuous power supply at 90-95% efficiency!

COMPACT

VY Canis Majoris Part 08

Posted by COMPACT Top Member Mar 28, 2017

31ST JULY

Crawling about

With the preliminary shakedown tests out of the way it was now time to delve into the detail.

I spent bits of today learning about the ins and outs of the CodeWarrior IDE, its C compiler and freescale MC9S08MM128.

I learned a few interesting things that might be of interest to all. Here they are;

 

1. MC9S08MM128 bit fields

The MC9S08MM128.h files contains structures and explicit definitions to support bit fields for some of the MC9S08MM128 registers.

These are quite useful but there is at least one caveat to their use. See the next item about optimisations for details.

These definitions allows direct reference to a specific register bits.

e.g.

PTAD_PTAD4 = 0;     // Turn "14-bit data" Green LED on

 

2. Optimisations

By default some optimisations are on and have some unwanted side effects.

My general rule is to turn all optimisations off until your program is fully working and work on optimisations afterwards.

 

     // Standard method - works with default optimisations
     PTAD = 0xFF;
     PTAD = ~(0x01<<4);
     PTAD = 0xFF;
     PTAD = ~(0x01<<4);

     // Bit field method - requires default optimisations off
     PTAD_PTAD4 = 1;
     PTAD_PTAD4 = ~PTAD_PTAD4;
     PTAD_PTAD4 = ~PTAD_PTAD4;
     PTAD_PTAD4 = ~PTAD_PTAD4;


3. Interrupt vectors - ANSI style

The XL_STAR demo program does not specify the interrupt vector for an ISR in the C code file.

 

     interrupt void button_press_isr (void)
     interrupt void accelerometer_isr (void)

 

So how is it done?

It is done with explicit entries in the projects link  .prm file with additional entries.

This requires altering the .prm file to specify the required vector for ISR declarations.

 

     VECTOR 27 button_press_isr      /* KBI1 keyboard pins from push buttons SW1 - SW3 */
     VECTOR 28 accelerometer_isr     /* KBI2 keyboard pins from MMA_INT1/2 outputs accelerometer */

 

I prefer to have the vector specified in the source code and not touch any external files such as .prm files unless absolutely necessary.

For this technique it is best done with the associated constant (from the device header file).

 

     interrupt void VectorNumber_Vkeyboard1 button_press_isr (void)
     interrupt void VectorNumber_Vkeyboard2 accelerometer_isr (void)
COMPACT

VY Canis Majoris Part 07

Posted by COMPACT Top Member Mar 25, 2017

29TH JULY

My First Program

Using my process of having to "Learn to crawl before you Walk before you Run", I wrote the proverbial "Hello World" program for embedded processors that does nothing more than turn LEDs on and off.  The procedure followed is that described in Section 8 (Is Corporal Klinger still wearing a dress?) of the XL_STAR Users Manual but with different code.  My program is devoid of any interrupts and just turns LED on and off.

 

Having the XL_STAR demo program on hand, all I did was to extract the relevant functions and put them into my program. I took this unusual approach so I could get something up and running without needing to know any specfic details of the Freescale MC9S08MM128 microcontroller.

The resultant main() is;

 

void main(void) {
  initialise_hardware();

  leds_all_off();
  leds_all_on();
  leds_all_off();
  leds_all_on();

  for(;;); /* loop forever */
}

 

This program is designed to be stepped through using the debugger.

Since only functions are called from main(), expedited program stepping can be done pressing the F10 key to "Step Over" on each function to observe the net result of each function.

 

Note: Depending upon where you locate the imported functions, you may require to declare function prototypes somewhere prior to the main() function.

For my first program I have;

 

     //# Function Prototypes
     static void initialise_hardware(void);
     static void configure_LEDs_for_GPIO(void);
     static void leds_all_on(void);
     static void leds_all_off(void);

 

declared before the main() with the imported function code located below main().

If you're wondering why the configure_LEDs_for_GPIO(); declared, it is used by the leds_all_on() and leds_all_off() functions.

COMPACT

VY Canis Majoris Part 06

Posted by COMPACT Top Member Mar 22, 2017

29TH JULY

The Big Bang

All armed and ready to go I accidentally blew my XL_STAR up.

I had a lapse of concentration when reconnecting my XL_STAR and connected the USB cable to the wrong USB connector.

There are two USB connectors - the right one and the wrong one (for power).

I only came to notice something was wrong when trying to run my program.

 

In my frantic search to fix this I discovered a new 1.04 revision of the XL_STAR Users Manual (entitled "Developing code for the element14/Freescale XL_STAR board") now which describes this very issue very first few pages and how to avoid it.

Hoping to recover from disaster, I drilled out the PCB hole near C1, checked for the open circuit and powered it up properly.

My XL_STAR sprang back to life. But how wounded? Only time will tell.

I built and downloaded my program and then crossed my fingers. It worked.

I then also rebuilt and downloaded the XL_STAR demo program. It worked.

 

It is looking hopeful.

COMPACT

VY Canis Majoris Part 05

Posted by COMPACT Top Member Mar 20, 2017

26TH JULY

Freescale CodeWarrior IDE

Putting the battery subject aside, It was time to check the CodeWarrior Installation.

 

I plugged in the XL_STAR to my PC.The USB device drivers installed without a hitch.

 

I then ran up the FreeScale CodeWarrior but encountered a read only error pop up about Read Only access to the preferences file.

Since I have Windows 7 restarted it using "run as administrator" to enable read/write access to the preferences file and it worked.

No dramas!

Did I miss a note in the documentation about this?

[29/07/2011] - Since then , I granted the User's group Modify rights to the CodeWarrior IDE 5.9 Prefs file in CodeWarrior bin folder

[29/07/2011] - I also deleted all IDE.EXE*.dump files in the same folder.

[29/07/2011] - I see how it goes.

[31/07/2011] - No problems as yet.

[04/07/2011] - None of the above configurations or problems encountered when installing and running on Vista.

 

I ran the Updater and updated the 3 patches it found on the Internet.

 

I then restarted CodeWarrior, reloaded the XL_STAR demo program, remade the file and executed the debug mode.

It worked as expected allowing me to single step through the sample code.

 

I'm now armed and ready to develop.

COMPACT

VY Canis Majoris Part 04

Posted by COMPACT Top Member Mar 19, 2017

26TH JULY

Battery

With the battery holder soldered in it was time to find a suitable battery.

I could not find any specific reference to a particular type of battery in the manual so I needed to consult the schematic diagram and the battery holder data sheet.

The schematic indicates that a rechargeable lithium ion battery is required.

The data sheet say that the 3008 holder is for a CR2450.

http://www.farnell.com/cad/2017758.pdf?_ga=1.241836161.260727887.1483275355

The battery voltage will be less than the output voltage of the charger.

With these considerations in mind I guessed that the batter is a LIR/PD2450.

(LIR = Lithium Ion Rechargeable)

I downloaded a data sheet for a PD2450 to confirm that it is 3.7 volts.

PD2450 Data

[30/02011] - As an experiment, I purchased a CR2450 non-rechargeable battery to see if it would work with the XL_Star board.

It is only rated at 3 volts but measured 3.2 volts out of the packet.

Before attempting this, I ensured that the unit was disconnected from everything to ensure that the battery charger would not risk exploding the battery.

The battery fitted in like a bought one. (Funny that, it was!)

Flicked on the power switch and hey presto, the program ran!

I switched it off and I removed the battery for safety.

For how long this battery would run is another matter. Maybe this can be found out at a later date.

COMPACT

VY Canis Majoris Part 03

Posted by COMPACT Top Member Mar 17, 2017

26TH JULY

The XL_STAR kit arrived last night.

As a bonus, all of the crosshair LEDS are installed and also got a coin battery holder.

Thanks very much element14!

 

The coin battery holder is not installed so I'll have to install it.

This is a good opportunity to use my 10mm soldering iron tip. My set of iron tips ranges from 0.4mm to 10mm. Here are a few pictures of them.

0.4mm ERSA TIP10mm ERSA TIP

0.4mm, 1.2mm, 10mm tips.

3 ERSA TIPS

 

Almost all hobbyists, professionals and even manufacturers have the soldering iron temperatures set far too hot. Many use temperatures of 350 degrees Celsius.

All this accomplishes is to burn the flux to a cinder, reduces the lives of the soldering tips and exposes components and PCBs to unnecessary temperatures.

 

Montgomery Scott (Scotty) from Star Trek used to say "How many times do I have to tell you. Use the right tool for the right job!"

 

The hint is to use the right tip for the right job and a correct technique. This allows a lower temperature to be used.

For this job, it is obvious that the 0.4mm tip is far too small and the 10mm tip is perfect for the job.

I use chisel tips as this provides sufficient surface area for the heat transfer.

 

A bit of testing show that the solder on the XL_STAR melts at about 240 degrees C so with my soldering set to that temperature the holder was soldered.

Some would argue that the large thermal mass of the lithium cell holder will suck away the heat from the joint and so it does.

The soldering iron must be able to deliver enough power on demand to keep the joint the right temperature and you need to ensure that this power is transferred to the joint.

A mostly forgotten item from an electronics workbench is flux paste (Order Code 1850216 or similar).

This is actually an essential item and can be used to greatly improve the heat transfer.

Flux Paste

Flux remover is another forgotten but essential item.  There are many brands and types available from element14.

There's even a "No Clean Flux" remover too!

Flux RemoverNo Clean Flux Remover

If you can't get the joint to heat up enough then a little more temperature more can assist. (For Pb free, 280-290 degrees C is acceptable. Avoid exceeding 315 degrees C!, Lower for 60/40 Sn/Pb.

 

I used my 150W (Yes 150W!) ERSA iCON 1 soldering iron (Order Code 162358) to solder the battery holder.

This iron monitors tip temperature and adjusts the tip temperature as necessary whether it requires more or less.

 

ERSA Soldering Iron

 

This picture is from the online catalogue. Don't use the temperature as indicated on this diagram on your XL_STAR unless you want to risk damaging it!!

Here is a demonstration of heating a large area to 200 degrees C. Similar results would have been obtained if the iron temperature had been set much lower because the thermal mass of the large tip radiates the initial spurt of energy with 150W heater recovering the tip temperature very quickly.

 

Fast forward to 3m02 for the large area heating test.

 

 

Here is a photo of the resulting solder joint. Good electrical contact and good mechanical strength has been made without any burnt flux or PCB damage.

Good Large Solder Joint

COMPACT

VY Canis Majoris Part 02

Posted by COMPACT Top Member Mar 15, 2017

25th July

Whilst waiting for the board, I commenced work by laying out the Static Memory LCD adapter board.

This board fans out the 0.5mm spaced pins to a more human friendly 100mil (0.100 inch) connector.

 

LCD Adapter PCB

COMPACT

VY Canis Majoris Part 01

Posted by COMPACT Top Member Mar 14, 2017

This is a reprint of my original experiences with the XL_STAR RoadTest.

The original posts were lost with a site upgrade but thank goodness I kept a backup copy.

 

Enjoy!

 

XL_STAR board Project Blog

(19/07/2011)

 

Waiting with anticipation for my XL_STAR kit to arrive!

 

Ideas, ideas, ideas!

What to do?

 

Static Memory LCDs?

This technology is relatively new and boasts low power requirements.

I've ordered some for another project and I am considering interfacing them to the XL_STAR.

These have a SPI interface and can be easily connected.

COMPACT

Decoys

Posted by COMPACT Top Member Feb 2, 2017

I've left a trail of decoys to make things harder!

COMPACT

CSD or CSI

Posted by COMPACT Top Member Feb 2, 2017

Computer Security is important.

Make sure you employ the appropriate measures.

Shutting down your Computer is a sure fire way to limit its exposure to online threats.

COMPACT

EAGLE gets an upgrade!

Posted by COMPACT Top Member Nov 28, 2014

I just started EAGLE 7.1 and it informed me that 7.2 has been released.

This has been downloaded and installed.

 

Details for 7.2.0 available here:

http://www.element14.com/community/message/133107/l/eagle-version-72-released#133107

 

In addition;

  • The User manual has been updated to "3rd Edition"
  • The ULP manual has been updated to version "7.2.0

The English ULP manual contains some German - "Inhaltsverzeichnis"