Oct 31

Bug hunting : malloc failed :-(

I’ve been tracking down an elusive bug which was causing one of my devices to occasionally start mis-behaving. The device would respond slowly (if at all) to some commands, and respond normally to others.

It was pretty obvious what the issue was when I attached the debugger and started single-stepping through the code while it was misbehaving.

I landed on the ‘return’ in this code:

prevLen = sizeof(LIST_ITEM)+32;
 pWorkItem = malloc(prevLen);
if(pWorkItem == 0)
 return 0;

so it was obvious I was getting a malloc fail, which meant I had ran out of memory somewhere along the line. The ‘return 0’ meant that the command silently failed, without any feedback to the user.

Continue reading

iOS 7 Tech Talks – Apple Developer

Aside

Guess who is not going to Apple’s Tech Talk in London this year?
Yip – I just got an email saying I wasn’t successful at getting a place this year. Places on these seminars are like hens teeth!

iOS 7 Tech Talks – Apple Developer.

Oct 25

Apples and Oranges

I Watched the Apple Keynote speech in which Tim Cook and others gushed about the latest devices and software to come from Cupertino.

There is new iPad Air, iPad Mini with retina display and, very interestingly, some more details about the new Mac Pro including for the first time, pricing. At over $3000 dollars, I don’t think I’ll be standing in line to buy one on launch day. If only….

Of course there is the release of the new Apple desktop operating system, called OS X Mavericks. I’ve been playing with Mavericks for a while, as I was lucky enough to be on the beta project, as well it being available to all registered Apple developers for a while too. Mavericks is good, but most of the big changes are under the hood. There is not much to read about the hidden changes on the Apple website, but the keynote speech (linked in the first paragraph, above) gives a few details, and the Keynote from the WWDC 2013 Developer’s conference gives a few details too.

On the surface there is some nice new touches, like iBooks and Maps updates, and better integration between apps, and of course better integration with iCloud. Simple things like ‘tags’ in the finder may not sound much, but it’s surprising how much they add to productivity. Best of all, the update to OS X Mavericks is completely free, just get it from the Mac App Store.

Speaking of ‘surfaces’ I see that Frank Shaw, VeeP Of Communications at Microsoft was none to impressed with Apple’s keynote speech. Of course not, he couldn’t see green cheese. You can read his somewhat missing the point Blog over here.

Anyway, best regards,

Kenny.

Oct 23

Logitech M570 Wireless Trackball – infuriatingly close to being a good device.

After decades of working with computer mice I have repetitive strain in my right wrist. It’s not too bad, but it means that if I use a traditional mouse my wrist quickly becomes very sore, with pain right up to my elbow.

I’ve found that using a thumb-operated trackball is much better and doesn’t generate any pain at all, but there are few of them around. I’ve been using the Logitech Wireless Trackball M570 recently, which I got from Curry’s stores. It is so close to being a great product, apart from one tiny, but infuriating defect:

The switches under the buttons wear out very quickly – I mean within 6 weeks of using it. The left button is now very twitchy. It often double, and triple-clicks when I’m trying to single click, and selecting text or doing drag and drop is just almost impossible.

I thought maybe I just had a bad one, so I bought another (from Amazon this time), and it worked great for the first few weeks, but now it has gone the same way.

Of course, being an eletronics engineer, I had a peep inside. The switches for the right and left buttons are the same, so I swapped them and the fault has gone away again, or at least it has moved to the right-click button, but I can live with that for now.

Problem is, I can’t actually find any other thumb operated trackballs.

Books for Electronics Engineers

Aside

Here’s a list of books I recommend for electronics engineers. If you have any further suggestions, post them in the comments and I’ll be happy to add them.

First, for a good grounding in electronics theory, circuit analysis, engineering maths for electronics and low level study, try this:
Introductory Circuit Analysis by Robert L. Boylestad. This text is often used in university undergraduate degree courses.

Next, if you are ever doing any analog audio electronics, you can’t go wrong with these books from Douglas Self:

 

For Microcontrollers and Arduino:

Or for details of the Cypress PSoC range of devices, try this:

Oct 22

Update: Issues with ICD3 on Mac OS X

Just a brief update on the issue I had using ICD3 on Mac OS X.

Having removed all traces of Java 1.7 (aka JRE 7) from the Mac, the ICD3 still wouldn’t work.

I un-installed MPLAB X and re-installed it again and I’m happy to report that it is working again now.

Oct 21

Issues with ICD3 in Mac OS X

I’ve been using Microchip’s MPLAB X on Mac OS X for some time now, and really getting along nicely with it.

I use it for various projects and with a range of different hardware targets and programmers.

I’m using MPLAB X v1.90 with PicKIT2, PicKIT3 and ICD3 and until recently I’ve had little or no trouble.

Last week, however, I allowed the 2013-005 Java Software Update from Apple to install. This updated my VM from JRE 6 to JRE7 (aka Java version 1.7).

Everything seemed fine until I tried to program a device using my ICD3 debugger/programmer.

Continue reading

Oct 17

Jim or Bob?

I’m working on a new interface board for a media system dock.

The dock is part of a multi-room audio system I have been working on for a major client. It’s a great system, lets you listen to any audio source in any area/room, and keeps all the wiring tidied away in a cupboard or some other out of the way area. The dock allows you to connect Apple devices such as iPhone, iPod or iPad and makes their media library available to the whole system.

Continue reading

Hello everyone!

Aside

Hi everyone

I know, I know, It’s about time I got a blog… that way people can see what I’m up to and I can share somethings I might find interesting with others.

Well here we are, wish me well!