Monday, 8 April 2013

Raspberry PI Model B (Rather late than never)

After some patience the Raspberry PI is available locally in South Africa no need to wait awfully long periods as advertised, here are some pictures of the model B I purchased over the weekend, the device is really, really small (credit card size to be specific see the pictures below)

The heart of the PI is powered by a ARM11 BCM2835 (ARM1176JZF-S 700 MHz processor) it’s a complete multimedia system on chip solution that’s found in many mobile / multimedia devices today which contains core system peripherals that makes up a computer. The only issue I had was obtaining a suitable power supply to power the device the minimal current rating specified by the official technical documentation recommends a 5 volts @ 700mA to power the device, the local supplier didn’t have stock of a suitable power supplies for the pi (bummer)… I wasn’t short of a solution a spare 5volt @ 750mA blackberry charger soon found another use, it was rated 50mA, 50mA more than the minimum so it worked pretty well. (Please note that loading the USB ports with USB hardware that draws a lot of current will of course force you to use a 5v @ 1.0Aamp supply)

Size comparison PI VS a debit card





The raspberry PI will probably be used as a multimedia device only as a replacement for the faulty DVD player. I will be looking at getting another one for python and Linux kernel based development research in the future at the moment I have other priorities to attend to.

Sunday, 31 March 2013

PC volt meter with a real time software and USB microcontroller interface 

Project summary: 


This project came about one day when my wireless mouse and keyboard failed to respond of course, I knew the source of the problem was as a result of weak peripheral batteries (no-brainer), as the mouse and keyword had battery led indicators built in, I simply changed it that issue was effortlessly sorted out with that said, my curious developer side kicked in… I was curious to find out what the voltage of batteries were when they were declared unusable I thought well, I have a multi meter to measure the battery voltage but, why not make the experience more fun? Like build a 4-channel 5V meter via USB. At the time I was already building some silly “hello world” led flashing demos which quickly bored me so the motivation for this project was no surprise to me. At the time I was flirting a lot with microcontrollers and embedded systems I thought this project would be good ground work to interface and bridge .NET code with low level serial usb communications and this was the result. 


The project prototype made up of the following : 

  1. A 18F PIC4550 microcontroller (running the microchip USB stack at full speed with a 20MHZ clock) 
  2. Firmware was developed with MPLAB X IDE v1.30 complier completely written in pure C and some assembly for delay timing. PICKIT-3 was used to program the device. 
  3. Communications using USB to serial communications real time voltage measurement software written in .NET running windows forms smart client with gauge components. 
  4. IDE used to write the windows smart client was visual studio 2012 using C#.NET 
Some pictures of the project: 




I obtained the components locally see the sources below.


If there's enough public interest I will be happy to publish and share the firmware and schematics.



Tuesday, 12 February 2013

South Africa is getting too expensive

It's just like the price of cars here, another easy way that they have found to rip of hard working people. 

The higher the house price the more commission for estate agents. The more fees charged by attorneys. The more you pay to the bank for your bond. The more taxes you pay, both to local and central government. Once again the average South African has to bend over and accept it with a smile.

Also people have no option but to pay those prices. It's called capitalism.

I am sure that in the UK if you earn 2- 3 000 GBP a month you could still find properties for 50 000, 70 0000 etc. Yes I know that London is expensive, but prices in the country as a whole generally are affordable.

A person earning $ 2 or 3 000 a month in the USA could still buy a house in the states for $ 80 - 100 000.

If you compare income to house prices, most people in the UK, and USA, could afford to buy a home. The difference between income and property prices is not that great.

If you compare income to house prices in South Africa the difference is so great that most people are unable to afford their own homes.

If you earn R 2 - 3 000 a month in South Africa you would be lucky to find a flat under R 200 000 or a house under R 400 000. There is nothing reasonable in the price range 100 - 300 000.

If you equate the R to the $ and GBP as 1 for 1, then South Africans pay 5 or more times for a house than people in the UK and USA.

It's an absolute rip off and a disgrace.

Friday, 13 July 2012

Visual Studio precompiled header issue solved

Visual C++ precompiled header issue solved

 

Today i found myself editing/removing and adding a few files for W32 .dll project im researching, only to run into this complie time error see below 

Error   1   fatal error C1083: Cannot open precompiled header file: 'Debug\xxxxx.pch': No such file or directory 


After an hour of googling and crawling through stackoverflow posts i solved the issue myself, seems like my .pch pre complied header file got corrupted while adding and removing .h files inside my stdafx.h.


 

Step: 1 Use the /Yc switch to recreate the .pch file.

 

Step: 2 Next use the /Yu switch to use the newly created .pch file

 

Done!

Sunday, 1 July 2012

SVN Mental reminder

  Files that you cannot add to source control include the following: 

  • Solution files (*.sln).
  • Project files, for example, *.csproj, *.vbproj files.
  • Application configuration files, based on XML, used to control run-time behavior of a Visual Studio project.


 

Files that you cannot add to source control include the following: 

  • Solution user option files (*.suo).
  • Project user option files, for example, *.csproj.user, *.vbproj.user files.
  • Web information files, for example, *.csproj.webinfo, *.vbproj.webinfo, that control the virtual root location of a Web project.
  • Build output files, for example, *.dll and *.exe files.


Monday, 8 August 2011

Initiation process the move from c# to c++ (Part 1)

Introduction

Its been quite a while that vie been using the Microsoft .net stack from its framework 1.1 release up till its current 4.0 release aggressively working a lot with its asp.net web framework to its WCF service technologies for about 5 years to be specific. It really brings a blessing to business when doing (RAD) rapid application development, it provides a lot of productivity even to novice programmers one can quickly feel the output of productivity when working with the framework as you hit the build command in Visual Studio however, being a inquisitive developer/individual I like expanding my knowledge in various domains and a firm believer that no one tool can service everyone`s expectations.

I started looking at some C++ code a few weeks ago mostly out of curiosity and as a result of a cold rainy weekend I found myself zooming in and out of C++ open source projects collected over the years, emule project being one of them. Not being a seasoned C++ developer I had a feeling that I didn't have a need or purpose to scratch here which was true, i didn't have need to !Bulk of my knowledge and experience resides in the managed world yet c# is similar in certain concepts everything feels so at home at times looking at code snippets and some times it felt like a complete stranger to me so why even bother learning this i mean i can spend the day playing a 3D game.. or learn something else in my domain my thoughts changed however, when decided to listen to my music play list using win-amp i found a potential case to apply my curiosity uhmm ....


The C++ Motivation

Two weeks ago I downloaded the latest win-amp and dabbled a bit with its plug-in functionality that it supports which allows amazing extensibility to the player, I was asking myself so how do i feature in the plug-in hall of fame .. Building a simple plug-in customized to my needs? And bragging to my friends how I build a hello world generic plug-in uh mm.. well I thought to myself well im willing to take up the challenge and learn the language...and silently sitting at my desk a thought creep-ed up "cant this be done in c# ?" there are probably .net managed wrappers that can support this however, it would feel like I’m cheating and probably miss all the fun not having a garbage collector clean up after me :), I took the stand at learning C++ (in my spare time) I felt it would feel more rewarding and probably improve my understanding of low level code.

I have some experience working with C++ and a *shy* amount of W32 programming mostly doing it for fun in my spare time back in the days building open GL cubes (heheh) and a "love for code with fast execution speed with agility. I now work (when time allows me) in c++ using visual studio 2010 and learning the win-amp API, vie started looking at the samples but the documentation for it is very fragmented im fighting with some basic concepts the API exposes but I’m getting the hang of it as get used to to language.


Prerequisites building a win-amp plug-in in C++:
  1. Time! and lots of it (If you not a seasoned c++/w32 developer )
  2. A suitable IDE i suggest Visual Studio express edition download
  3. Win-amp SDK5.55 download
  4. Lean important c++ concepts and the win32 API (DONT USE MFC its only a thin wrapper on top of the w32 API this only hinders the win32 learning experience even more)
  5. Reusable libraries try boost

Suggested C++ Resources and books

Read more on how to implement a functional win-amp plugin: Part 2

Enjoy happy coding !

Initiation process the move from c# to c++ (Part 2)

..TODO