Showing posts with label Microchip. Show all posts
Showing posts with label Microchip. Show all posts

Tuesday, March 8, 2011

Embedded World 2011 - Cortex-M3 everywhere

This year I renewed my visit to the Embedded World show in Nuremburg, Germany. Walking around the four halls that make up this big show it was simply impossible not to notice the ARM Cortex-M3 based controllers all around. Most chip manufacturers showed off boards with Cortex M3 devices, including ARM itself with their mbed board and other dev boards. There were also some Cortex-M4 demo's around from f.i. NXP (LPC4300) and Freescale (Kinetis).

This show was also rich in free kits; especially ST was very generously handing out STM32 and STM8 kits. I did not accept all of them, because I have no idea what to do with ‘em. Yet I did leave with (amongst others) a BeagleBoard-xM (thank you TI!), an FTDI Vinculo that I will review later on this blog and a ZigBee kit from ST. Fujitsu promised me to send me a Cortex-M3 kit by mail, I wonder if it will ever arrive.

Update 18/3: I received today a Fujitsu SK-FM3-100PMC kit, nicely boxed. More about it, hopefully soon, on this blog.

Due to a rather large amount of business meetings I did not see a whole lot of new or exciting things this year. However, I did get a demo of the very impressive new PIC32 compiler from MikroElektronika. These guys are definitely setting the new comfort standards for embedded software development. Wow! I always liked Microsoft’s Visual Studio, but this is way, way better. And the good news is that they are planning an ARM compiler too! At just under $300 (or $200 if you buy a board too) this is a bargain.

While I’m on compilers, Atmel too presented a new one: AVR Studio 5. This is a great tool too, and toujours completely free. V5 brings together AVR Studio 4 and AVR32 Studio into one IDE. It also integrates the AVR Software Framework (ASF) and over 400 example projects that used to be all over their website. Now you just pick your board and then the example that comes closest to what you want to do and off you go.

From the chip front I would like to mention the new ultra low-power 32-bit micro-controller family from Renesas, the RL78. Besides being low-power, this family is also ultra low-dollar. With an operating current of only 70 µA/MHz this is a direct competitor for the MSP430 from TI. But TI told me that they will announce an ultra-ultra-low-power MSP family later this year that will blow away the competition.
Microchip proudly announced their new PIC18F K80 micro. This is an 8-bit device that costs over one dollar, even at high quantities. This nicely illustrates the 8/32 bit paradox, but both Atmel and Microchip expect that the 8-bit market will continue to grow.

That is was not only Cortex-M3 all around proved Digi who had on display their pretty impressive ConnectCore Wi-i.MX51. As Digi's website says: "This module is a highly integrated and future-proof System-on-Module (SoM) solution based on the Freescale i.MX51 application processor with a high performance 600/800 MHz ARM Cortex-A8 core, powerful multimedia capabilities and a complete set of peripherals.".



The kit on the left is running Android, the kit at the right runs Ubuntu.
Digi's latest board, the ConnectCore Wi-i.MX53, was on display at the Freescale stand.
Rabbit 6000 modules are now available too.

Analog Devices showed me their new MEMS gyroscopes that have extremely low drift. So, I guess this is good news for the dead reckoning people.

FTDI presented a rather mysterious device, the FT1248. Although they did make it clear that this device communicates over a 1, 2, 4 or 8 bit wide bus of which the width can be adjusted on the fly, I did not grasp the reason of being of this chip. It is probably very useful or they wouldn’t have spent any time on it, but useful for what exactly? I guess that it is a bus extender of some sort, but I can’t find the data-sheet. Oh well, I am sure someone will figure this out for me.

I really like this show; I can hardly wait for next year.

Thursday, July 15, 2010

Microchip Application Library: GOL trouble

In a previous article I discussed the PIC32 Multi Media Board (MMB) from Mikroelektronika. Looking around a bit on the web searching for PIC32 related projects I came across the PIC32 Audio spectrum analyzer project by Andrei Mehiläinen. He used a PIC32MX360F512L on a TechToys PIC24 evaluation board (PIC24-Eval-Board, this board supports 100-pin PIC24 & PIC32) with an additional 320x240 TFT display board with resistive touchscreen and an SSD1928 graphics driver. Andrei’s system is very close to the MMB, the main differences are the processor (the MMB has a 460F512L), the graphics chip (an HX8347D on the MMB) and the way the pins are used. I therefore decided to port Andrei’s code to the MMB. This would be a good summer holiday project (being a nerd I always take a development system to the beach). This summer was going to be dedicated to PIC32 projects.

Studying Andrei’s code I soon felt the urge to improve it a bit, especially the user interface as Andrei’s system didn’t really have one. I first started drawing a grid based on MMB example code and then became serious about it by deciding to develop some generic user interface for measurement systems in the style of modern oscilloscopes. So I downloaded and installed the latest Microchip Applications Library (MAL) (v2010-04-28). Having never used them before, I also watched the web seminar about the GUI architecture of the graphics library. In the help files I found a tutorial explaining how to start a new graphics project and off I went.

In the beginning all went well, but when I wanted to add the library C-source files to the project I discovered that I was apparently not doing things the right way as the project would only accept assembler files. So I started all over again but this time using MPLAB’s Project Wizard and now I could go all the way up to trying to build the project. This is where things started to go really wrong: the tutorial code would not compile at all. Of course this was to be expected as the tutorial is for a PIC24 on an Explorer 16 board (yes it is, read the last sentence of the tutorial) and I had modified it a bit to use with a third party PIC32 board.

The first step to glory would be to get the Hardware Profile right. That was easy enough as I used one from the MMB example code. As mentioned before the MMB has an HX8347D (note the D) graphics chip and the Microchip library seems to support it (it knows the A and D version). It won’t compile however as brackets are missing all over the place (DeviceSelect/DeviceDeselect). Clearly this part of the graphics library was not tested properly before releasing it. I fixed this, but only to find out that I was now missing a definition somewhere and compilation would therefore still not complete. Comparing the new library to the (working) one that came with the MMB I noticed that the new library had some changes that required a definition that has something to do with GFX(E)PMP (now what is that again?). There are two possibilities that I tried both, and both gave me other (but different) errors. This is where I gave up (for the moment, I will continue since my holidays aren’t over yet).

Microchip has put a lot of effort in developing their Applications Library, but it is a shame that I am to dumb to use it. It would have been nice if they would have tested it better and if they had provided a working tutorial. Now I have wasted lots of time without getting anywhere. I now know the ins and outs of the graphics driver selection and other low-level GOL details, but I still haven’t been able to draw a single button. Surely it is all very easy, but why didn’t they explain it a bit better? Or maybe it only works properly on Microchip evaluation boards?

At the time of writing I have not figured it out yet, so if you know what I am doing wrong, please let me know. Also, if you happen to know where the API description is that is mentioned in the web seminar, drop me a line.

Thursday, June 3, 2010

PIC32 MultiMedia Board (MMB)

You may know MikroElektronika from their big development boards for PIC, AVR and ARM microcontrollers; you may even own one. I have one of those boards too, the EasyPIC4 that measures about 19 by 23 cm. This is pretty big and not something that you would use in a project. You can develop your project on it, but you have to build your own hardware if you want to actually use it in an application.

They also do some smaller boards. One particular interesting one is the PIC32 MultiMedia board (MMB) and I managed to get one to play with. For some reason the PIC32 does not get a lot of attention, but maybe this board will change that? It is about 9 by 12 cm and well thought out. On the solder side it has a 320x240 pixel TFT display with touch screen, a mini joystick, 6 LEDs and a temperature sensor. On the component side live all the other parts: the PIC32, the power supply and connectors. It has a power socket, a 9-pin RS-232 connector, an SD-card connector, a mini-USB male and a full-size USB host connector, a microphone input (mono) and a stereo headphones output. There is also an ICD programming port and there is room for an MRF24J40MA ZigBee module from Microchip. All the connectors are on the two sides (top & bottom) of the board, the left & right edges have each a row of holes for pin headers so that you can piggyback another board in case you need one.

When you power the board (with a USB cable f.i.), it does a slideshow of some nice photographs. That is all that it does, but it is pretty hypnotizing: butterfly, flower, tree, chameleon, city, oh… butterly again.

The CDROM labeled “software” does not contain development tools. It has a large amount of examples and documentation, but not only for this board, but for all the MirkoE boards. As I happen to have an ICD3 pod I decided to reprogram the board with the Mandelbrot demo. Loading the precompiled HEX file into the board was easy once the ICD3 pod was done reconfiguring itself. Manipulating the joystick now starts the Mandelbrot demo. With the joystick you can scroll in four directions and pushing it zooms in. It is reasonably fast.


Loading the example code in MPLAB was a bit more problematic as the example makes use of some libraries that were not where they were supposed to be. However, after a bit of relocating files I managed to compile the Mandelbrot demo.

The demo is actually a Microchip demo and a well informed source told me that the reason for this is that the board was originally designed by Microchip, but was outsourced to MikroElektronika due to a lack of resources at Microchip. I have seen a Microchip movie demo on this board, but I do not have the code yet.

There is also a test program on the CDROM. Loading this will light up all the LEDs and fiddling with the joystick you can skip, pass and fail certain tests.

More demos are available on the web page for this board. They let you play Rubik's cube or listen to Boney M and Freddy Mercury. BTW, make sure that the two jumpers behind the headphones socket are in the "UP" position, i.e. closest to de board edge, otherwise you will not hear anything. (See the manual if in doubt.)

One negative point: when I tried to insert the headphones with a jack of the right (3.5 mm) diameter in the headphones socket, the whole thing came off. Luckily it didn't cause any damage to the parts behind it, but it was clearly a case of bad joints. Before inserting anything, check the joints and resolder if necessary. This is probably also a good idea for the microphone socket.

I have tried most of the other demo's too and they are pretty nice. One demo showing off the Microchip graphics object layer gives a good impression of the possibilities of the graphics library.

Conclusion: if you want to give the PIC32 a go, this is definitely a good starting point. The board is reasonably priced ($150) and you could do some nice things with it. I do not really see why you would want to make an MP3 or MP4 player out of it, but transforming it into a DSO or a logic analyzer would sure be an interesting project. The touchscreen with the graphics library allows for very slick user interfaces.

Wednesday, December 30, 2009

Do you know MIPS?

You probably have heard about ARM processors. ARM seems to be everywhere and we are flooded by press announcements about new ARM-based products. This might make you think that ARM is currently the most successful processor around, especially if we think about 32 bit processors. But did you know that there exists another 32 bit processor for embedded applications? Well, yes, of course, there are other 32 bit microcontrollers that are not ARM, but there is one particular brand that you probably have as a brain for at least one of your electronic gadgets: the MIPS processor.

Like ARM, MIPS Technologies does not make silicon, but only so-called soft cores, a piece of software that describes a processor core. To use a soft core you have to licence it and put it in a chip yourself. There are many MIPS cores, not only 32 bit but also 64 bit, and there are many companies that use one of those in their products. To name a few (in random order): Sony, Realtek, Broadcom, Pioneer, Motorola, Cisco, Microchip, Hewlett-Packard, Philips, Toshiba, Canon, Samsung, JVC, Pentax, Casio, Minolta, NEC, Fujifilm, Ikanos, etc., etc. That is quite an impressive list for a processor that we hardly ever hear about, isn't it?

As you can see from the list of MIPS users, these are all big well-known companies that make many types of consumer products, which explains why you probably own at least one MIPS processor. Digital camera's, network routers, Wi-Fi access points, DSL modems, printers, netbooks, digital photo frames, DVD players, GPS receivers, game consoles and even cars, many of them contain a MIPS core. Unlike ARM, MIPS Technologies does not make a lot of noise, yet their products are everywhere.

But there is one major product in which you will not likely find a MIPS: the mobile phone. This market is almost completely dominated by ARM, but MIPS is hoping to get in thanks to Google's Android, the open source smart phone operating system. Android, developed for ARM processors, is a platform that current MIPS users might want to use too, so MIPS Technologies started porting it to their products. And then, with a bit of luck, MIPS users will start building smart phones with MIPS cores.

For the electronics hobbyist the easiest way to get started with MIPS is probably to buy a PIC32 processor from Microchip. The PIC32 is based on the MIPS32 M4K family and according to Microchip they perform better than an ARM7 clocked at 100 MHz.
If you look hard enough you can also find single board computers with MIPS processors and run for instance Linux-MIPS on it. Or hack a router and play with OpenWRT.

Share your MIPS experiences!

Wednesday, November 25, 2009

Are you a PIC fanatic or an AVR lover?

Twenty years ago life was easy. Nobody really used the term embedded yet and there were only a few microprocessors to choose from. The choice was roughly limited to Intel’s 8051, the 6809 from Motorola, MOS Technology’s 6502, the Z80 by Zilog and maybe the H8 from Hitachi. These were all 8 bit processors. Personally I was a fan of the 6502 and I did not like the 8051. As a hobbyist building a computer system was rather a challenge because of the complicated board design due to the external memory and peripherals, but soldering was easy.
The integration of memory and peripherals into the chip turned the microprocessor into a microcontroller and made board design much simpler. The PIC that was introduced by Microchip somewhere in the early nineties was simple, some had EPROM on-board, and was cheap and easy to come by, which made it a good choice for hobbyists. The AVR introduced by Atmel a bit later was one of the first to include flash program memory which made it a good choice for hobbyists too.
Nowadays embedded has become a buzz word thanks to the thousands of different microcontrollers on the market. 8 bit, 16 bit, 24 bit, 32 bit, you name it, and it can be had. Some of the oldies are still around, like the 8051 in many incarnations, or the Z80 (by Rabbit Semiconductor). They are now faster of course and come with more options, but they are essentially the same as 20 years ago. Today building a microcontroller system is easy and within reach of most hobbyists, although the soldering has become somewhat more difficult.
Choosing a microcontroller on the other hand has become complicated. If we stick to the hobbyists we see two large user groups: PIC users and AVR users. Of course lots of hobbyists use other controllers, but these two families are probably the most popular. Now which family do you use? Are you a PIC fanatic or an AVR lover? Both families have flash memory and free development tools, both are cheap and easy to get. So how did you get into AVR or PIC? I have not been able to choose between the two, maybe you can help me? You can post your comments on this blog.