PICAXE to Microchip Part List with Datasheet Links

E-mail Print PDF

I was trying to answer some PWM prescaling questions on the Yahoo PICAXE group and needed a list of the Microchip part numbers used by each PICAXE version. 

It took a bit of digging but I came up with the following list with links to the Microchip datasheet for the parts.

PIXAXE MicroChip Microchip DataSheet
08 PIC12F629 http://ww1.microchip.com/downloads/en/DeviceDoc/41190E.pdf
08M PIC12F683 http://ww1.microchip.com/downloads/en/DeviceDoc/41211D_.pdf
18 PIC16F627 http://ww1.microchip.com/downloads/en/DeviceDoc/40044F.pdf
18A PIC16F819 http://ww1.microchip.com/downloads/en/DeviceDoc/39598e.pdf
18X PIC16F88 http://ww1.microchip.com/downloads/en/DeviceDoc/30487c.pdf
28A PIC16F872 http://ww1.microchip.com/downloads/en/DeviceDoc/30221c.pdf
28X PIC16F873 http://ww1.microchip.com/downloads/en/DeviceDoc/39582b.pdf
40X PIC16F874 http://ww1.microchip.com/downloads/en/DeviceDoc/39582b.pdf

Flying the J3

E-mail Print PDF

While in Irvine, CA for business I had the opportunity to fly a Piper J3 Cub. 

The cub is on line at Sunrise Aviation at John Wayne Airport in Irvine CA. 

There are not too many opportunities to fly a real J3 in New Zealand and having recently renewed my PPL in a taildragger (ZK-CIT) was keen to give the Cub a try.


What can I say..... it was a blast.  Flying from the back seat wasn't as difficult as I expected.... it helped that the CFI I flew with was short and slim so the airspeed indicator was visible but even this was for a quick cross check..... the picture out the window made it fairly easy to fly the required speeds.  I also tended to flare a little high for the first few landings although a bit more practice would help get that picture right.

I was very surprised at how heavy the controls were.... particularly the elevator in the flare.... I guess that is what trim is for!

It was certainly interesting operating a cub into an airport that sees a constant stream of 737, 757 and A320 airlines plus business jets.  It must have made for some interesting comments from any passenger who looked out the window... if any do!  Not really an ideal location for a Cub as he approaches tended to be fast and steep to avoid the wake of the larger aircraft on the parallel runway.... but a lot of fun anyway. 

Now I need to find a J3 on a grass strip to play with...... maybe Andover Flight Academy when I am in New Jersey in May 2007.... although the Stearman looks interesting too!

Without getting on the "taildraggers are better...." bandwagon I have to say that learning to fly a taildragger has been one of the best things I have done... mainly because there are so many interesting and different airplanes out there that you can try out.  Trikes a great but they tend to be very similar......


PICAXE 08M Motor Running Indicator

E-mail Print PDF

Living in the country means having certain technology/equipment/stuff that normal city living people don't have.

One of these things is a bore that supplies water for our stock.  This has a 100m (approx) pipe down into the ground and pulls the water up into a header tank.  We had a problem a few months back where the bore died due to old age/splits in the pipe and wear in the valve at the bottom of the pipe.  In reality is was probably performing worse and worse over time until it eventually got to the point where it couldn't fill the header as fast as we were draining it.

The bore is now fixed but this got me thinking.... if I had a way of tracking the pumping time each day it would show a trend and indicate in advance if there were impending problems.

While it is possible to use a hall effect sensor and monitor the current flow to the pump this was getting a lot closer to the 240v power than I wanted to get.

Instead I built a small unit based on a PICAXE 08M and an IR Diode/Sensor that monitors if the motor is running by watching for interuptions from the pump arm.

The output of the unit is a logic level signal that indicates the pump is "running" or "not running".  This signal is used by an AVR/Packet Wacker based board which collects data and makes it available for loading into a MYSQL database for later trend analysis.

The code for the PICAXE 08M is as follows:

' Bore Pump Running Monitor
' Checks for regular breaks of the IR bream and provides a running/not running status
' via the status output pin
' Pin Assignments:
' 0 = (Out) Serial
' 1 = (Out) Pump running (1=running, 0 = not running)
' 2 = (Out) PWM
' 3 = (In) IR Status
' 4 = (Out) Mode Indicator (1 = setup, 0 = monitoring)

' Constants

symbol C_RUNNING = 1
symbol C_NOTRUNNING = 0
symbol C_AIMTIME = 30
symbol C_WARNTIME = 30
symbol C_SLEEPTIME = 30
symbol P_MODE = 4
symbol P_IR = 3
symbol P_STATUS = 1

' Variable Usage


#picaxe 08m

        ' Configure PWM Pin 2 for 40000hz PWM Output

        pwmout 2 , 24, 50

        ' Initial state is not running until we decide if it is

        low P_STATUS

        ' First wait until the IR signal is received so we know the installation
        ' is ok and future interupts for loss of signal is caused by the pump arm
        ' breaking the beam

        low P_MODE
        if pin3 = 0 then startloop2
        ' IR Signal so Mode indicator on and count trigger until the limit is reached

        high P_MODE
        pause 150
        if RUNTRIGGERCOUNT <= C_AIMTIME then startloop
        goto startloop3

        ' No IR Signal so Mode indicator off and reset trigger count
        low P_MODE
        goto startloop
        ' Tell the installer that the aim should be ok and we are waiting to check
        ' it stays valid for 5 seconds before initializing interupts

        pause 100
        toggle P_MODE
        ' If IR lost then restart sequence

        if pin3 = 0 then startloop2

        ' Keep checking while we tell the user

        if RUNTRIGGERCOUNT < C_WARNTIME then startloop4

        setint %00000000, %00001000
        sleep C_SLEEPTIME
        if RUNTRIGGERCOUNT > 0 then mainloop2
        low P_STATUS
        goto mainloop

        high P_STATUS
        goto mainloop

        setint %00000000, %00001000

The PICAXE code does three things:

  1. It uses PWM to generate the 40000hz signal to modulate an IR LED.
  2. It monitors the output from the IR sensor to determine if the beam is aligned/broken.
  3. It uses an LED to provides an aiming function for initial installation.

All with less than 80 bytes of code... pretty cool eh!


Optimizing VMWare Workstation Performance

E-mail Print PDF
VMWare Workstation is a fabulous tool for software demonstrations (and development, testing and maybe even production... but none of these uses are the focus of this entry...).  Many companies including the one I work for use VMWare Images and the free VMWare Player software to provide preconfigured demonstration systems either directly to customers or for the company sales team.

As images get larger and the application/sales team requires Windows XP (suitably licenced of course) in the images for demonstration we started seeing performance issues that didn't exist with our previous Windows 2K Images.

I have found the following VMWare Image configuration settings significantly improve performance:
  1. Use SCSI (not IDE) disks in the image.
  2. Ensure virtual disks are PreAllocated instead of Growable.
  3. Ensure virtual disks are configured as Independant and Persistent.
  4. Prevent memory trimming by adding MemTrimRate=0 to the .vmx file for the image.
  5. Prevent creation of a VMEM file at runtime by adding sched.mem.pshare.enable = “FALSE” to the .vmx file for the image.
  6. Also adding mainMem.useNamedFile=FALSE to the .vmx file form the image.
  7. Disable Networking if it is not required.
The assumption with this configuration is that you are running one VMWare Image at a time and have a host with sufficient available memory so the allocation specified in the .vmx will not cause swapping on the host.

None of this is particularly new... it is all documented in Performance Benchmarking Guidelines for VMware Workstation 5.5.

Page 29 of 30

Powered by Easytagcloud v2.1

Contact Andrew Quinn

jaquinn@ihug.co.nz http://twitter.com/jaquinn