Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

Increase microcontroller code efficiency

C compilers are getting more and more advanced, but there is always a trade off made between speed and code size. Compiled code can be faster or smaller but not both. So you have to choose which part is more important speed or code size. The Increase of microcontroller code efficiency can be done in many ways. Don’t trust compiler optimization features, as they might not bee as effective as you expect. It is better to grab some profiler and inspect what parts of your code takes the most time and size. It is better to follow some techniques that may reduce code execution time and increase microcontroller code efficiency:

Continue reading

First LPC2148 ARM7 microcontroller test – led blink

This is simple led blinking routine using my development board. The compiler I used was WINARM. I like this compiler because its free and adaptation is easy while the same functionality is in WINAVR. This simple test just blinks pin 16 of port 0. This I used when I first got to know ARM microcontroller. Here is the main code: /************************************************* * WinARM Demo P0.16 blink **************************************************/ #include “types.h” #include “LPC214x.h” #include “config.h” #include “armVIC.h” #define IOPINS016 16 static void lowInit(void) { // set PLL multiplier & divisor. // values computed from config PLLCFG = PLLCFG_MSEL | PLLCFG_PSEL; // enable PLL PLLCON = PLLCON_PLLE; PLLFEED = 0xAA; // Make it happen. These two updates PLLFEED = 0x55; // MUST occur in sequence. // setup the parallel port pin IO0CLR = (1< IO0SET &= ~(1< IO0DIR =(1< // wait for PLL lock while (!(PLLSTAT & PLLSTAT_LOCK)) continue; // enable & connect PLL PLLCON = PLLCON_PLLE | PLLCON_PLLC; PLLFEED = 0xAA; // Make it happen. These two updates PLLFEED = 0x55; // MUST occur in sequence. // setup & enable the MAM MAMTIM = MAMTIM_CYCLES; MAMCR = MAMCR_FULL; // set the peripheral bus speed // value computed from config.h VPBDIV = VPBDIV_VALUE;…

Continue reading

Philips introduces advanced Hi-Speed USB microcontrollers

Royal Philips Electronics introduced the LPC2800 series – the industry’s most advanced ARM-based Hi-Speed USB microcontrollers on the market. The Philips LPC2800 is the first ARM7 MCU to deliver USB 2.0 device capabilities with maximum standard compliance and an on-chip Hi-Speed 480 Mbits/sec transceiver, and the first to enable single battery cell operation. These unique features allow embedded system design engineers to incorporate new capabilities into products such as PC peripherals, SD memory cards, smart card readers, and other USB battery-powered devices – all at a competitive price point. More at www.semiconductors.philips.com

Continue reading

GNUARM for ARM microcontrollers

In this article, you’ll find some information about how to configure the GNUARM toolset for compiling ARM7 microcontrollers.GNUARM is the open-source toolset for ARM7 MCUs. It has a GCC compiler and debugger. Our purpose now is to set up tools in a Windows environment and compile one project.First of all download the compiled toolset from https://www.gnuarm.com: Select the newest [GCC-4.0 toolchain] located below Cygwin.After it is downloaded, start the installation: Start window Accept license agreement. Select folder where do you want GNUARM to be installed: Select the components. You can select all of them. Chose Start menu folder name – just leave as it is. Select the desktop shortcut to be placed. I highly recommend checking Cygwin DLL because I had to copy DLLs to copy manually despite I had Cygwin installed. If this option is checked, DLL files will be copied without bothering you. And press install.. Select checkbox in order to create system variable: PATH=c:\gnuarm\bin After we have GNUARM installed, download Binutils from https://optimize.ath.cx/ARM7/src/utils.zip, download this archive, and unpack all contents in the c:\gnuarm\bin folder. Also, download https://optimize.ath.cx/ARM7/src/cygncurses-8.dll and put it in c:\gnuarm\bin folder. Now we are set to start compilation. Let’s try the test compilation. Just download…

Continue reading

ARM7-Base development board for LPC2148

After the ARM mini-board for LPC2148 is created, it’s time to develop a development board. I want to make the board as universal as possible.So I decided to put I2C, SPI, COM, and JTAG on board. I decided to use an external voltage adapter as there are needed 5V and 3.3V DC sources. For my experiments, I can use those voltages straight from a PC source. 5V there is used to supply MAX232IC. I decided to use it instead of MAX3232 because it is easier to get them in the market. Of course, I left the ability to use and MAX3232 by changing the jumper. All other free pins I made accessible by adding pinheads inboard.

Continue reading

ARM7 LPC2148 mini board

One day I’ve got an ARM LPC2148 chip in my hands. The Philips LPC2148 is an ARM7TDMI-S based high-performance 32-bit RISC Microcontroller with Thumb extensions 512KB on-chip Flash ROM with In-System Programming (ISP) and In-Application Programming (IAP), 32KB RAM, Vectored Interrupt Controller, Two 10bit ADCs with 14 channels, USB 2.0 Full Speed Device Controller, Two UARTs, one with full modem interface. Two I2C serial interfaces, Two SPI serial interfaces, Two 32-bit timers, Watchdog Timer, a PWM unit, Real-Time Clock with optional battery backup, Brown-out detect circuit General purpose I/O pins. CPU clock up to 60 MHz, On-chip crystal oscillator, and On-chip PLL.

Continue reading