Friday 9 January 2015

Running MPLab IDE from MAC Book Pro

Did a bit of a Google on the subject of this post and found that various things don't quite work on the MAC. Yes you can get MPLabX for the MAC but MPLabX doesn't support PicKit2 (my preferred mode of operation) - all my dev up to now has been on my Windows7 laptop, where I have MPLab8 & various C compilers. The problem is that in my electronics lab I only have a MAC, well actually this isn't completely true as I have a Windows desktop and several Linux servers, but the Mac is right next on my electronics work bench and I have put a monitor on the wall above - so I have the motivation to make my MacBook run MpLab8, which means running windows7 on it.


So after much faffing around I decided to make my 2007 MacBookPro run Windows using Boot Camp. Upon initial investigation this seems very straight forward, well it is if you have a modern MacBook, which mine isn't (although I did put a 1T hybrid drive in it which makes it very quick).


The steps are as follows:


1. Run boot camp installer, this will ask you to make a BOOTCAMP partition, I made mine 153G, for no real reason, other than the minimum of 37G seems very piddle.


2. Get the original Windows 7 install disk and let Boot Camp boot from it to do an install.


This is where the fun begins.... It starts to appear to boot, then shows the text:


Select CD-ROM Boot Type...
1:
2:


Then you can go no further, you cannot select 1 or 2 or anything.


To get round this then you need to make a new Windows 7 boot disk - this is very straight forward, but does require a few additional tools.


Firstly go to:
http://www.iruberleet.org/2011/10/12/fixing-select-cd-rom-boot-type-when-installing-64bit-windows/


Create 2 directories on the root of your C: drive called windows7contents and newwindows7dvd
then follow the instructions at the top of the article. This will create you an ISO, but don't go rushing off to burn this image to a DVD - it won't boot in the MAC.


Now go over to http://www.winiso.com/download.html and download the free version of the tool - at time of writing this was 5.3 - and install (I was actually able to install version 6, which seemed to be included in the download - I'm sure any version will work)


Using WinISO create an img file: From the Bootable menu select "Extract Image", select the ISO then save this in the same directory as the ISO itself.


Then from the Bootable menu -> "Select Boot Image" and select the img file created in the previous step.


Then put a blank DVD in your DVD r/w drive and click on Burn.


Then you can proceed to install windows.


(This is all described well here, http://www.simplehelp.net/2009/01/15/using-boot-camp-to-install-windows-7-on-your-mac-the-complete-walkthrough/ but if you have an old Mac like me then you are stuck with Boot Camp 3.)

PIC to TC35 comms issues

Ahhhhhhhhhhhhh, ahhhhhhhhh, noooooooo etc.

Right I have the comms OK from PC to TC35, I can sent comms ok from PIC to PC. So why oh why cant I send the comms from the PIC to the TC353....it's the same commands!!

This diagram explains the problem....

I can't figure out why the MAX232 on the TC35 side won't even register that it is receiving anything. When the PC is sending AT commands to the TC35 RS232 the TX & Rx lights blink. But when the PIC is trying to do the same there is not acknowledgement of anything being received. Eh!!

Thursday 8 January 2015

Can now receive calls!!

I have been messing about with the TC35 GMS modem module and trying to get calls received.

According to the DOCs the word "RING" should be received when a call is received. Indeed I have experienced this when I was using the Nokia in the older version of Retro-Mobile.

I have literally spent hours trying to get a call received via the build in 9-D RS232 comms socket connected to my USB-COM port.

I was just about to order a new one on ebay, when I decided to try and use the headers on the module (which I had to solder on) and a max232 development board I bought to level-shift the output of the PIC.

It worked, must have a duff RS232 9-D socket or something!!

Anyway this makes it much easier and I can now develop the C code for the incoming call :)

NOTE:

The TxDo on the TC35 goes to the RxD on the MAX232 header.
Power is taken from the TC35 VDD to power the MAX232 module (5V ish).
GND on the TC35 has to be connected to GND.
It doesn't seem so important that the MAX232 module has its GND connected.