Question re : Axe201 (28x2 module)

lornetw

New Member
I haven't used Picaxe for quite a few years and am trying to get back into using Picaxe by using an Axe201 (28x2 module). I had a few questions.

1) In the Manual 1, page 49 , under Testing the System there are instructions for testing a simple program by turning on and off an LED. However, the instructions talk about connecting to either directly to a chip on a proto board or a project board. Which is my 28x2? There are 2 drawings but I am not sure which way to connect the LED and 330 ohm resistor.

2) I mis-read the page regarding the orientation of my 28x2 and didn't realize the chip was 180 degrees the other way around. Hence, next question :

3) How do I check if my 28x2 is still OK. Upon doing a search on the forum I found a reference to doing : View, Options, Check Firmware but this does not work with PE6. Is there a way to check my 28x2? The onboard LED still lights up (I wired it to 5v) but I cannot get an LED on pin B.4 to flash.

4) If I wanted to switch on and off the onboard LED (pin 3?) how would I program that? It doesn't seem to follow the standard Port.Pin convention. On page 2 of the Getting Started document it says I could connect it to an output pin but would I have to use a 330 ohm resistor?

Any help would be greatly appreciated.

Regards,

Lorne Wilkins, Montreal, Canada
 
Last edited:

inglewoodpete

Senior Member
Hi Lorne, Sorry to read of your problems understanding the 28X2 module. I have never used one, so can only give my slant on the documentation, which appears to have been written for people with some experience rather than beginners.

1a) Page 37 describes the operation of the LED, which I will reword: The LED connects between pin (leg) #3 of the module and 0v via a 330ohm resistor. With the 0v (-ve) leg of a 3 to 5v supply connected to the 0v pins (legs) #4 and #27 of the module and +ve connected to pin 3, the LED should light.
1b)With power connected to the module (Both 0v pins (legs) #4 and #27 and 1 x +ve supply of between 7 & 12 v pin (leg) #28) and your AXE027 cable connected, you should be able to test the computer-to-chip connection via PE6 Workspace Explorer/Settings: "Check PICAXE type connected" (Firmware Check). If not, check that you get 5v out of pin (leg) #25. It is possible that components of the module have been damaged if 7-12 volts was applied when you had the module reversed.

Until we can prove that the module has survived the reverse connection, I don't think that the other questions are worth pursuing at this point.
 
Last edited:

lornetw

New Member
Hi inglewoodpete. Many thanks for your prompt reply. I will give your suggestions a try.

I was able to test my 28x2. The following are the results of Workspace Explorer, Settings, Check Picaxe type connected:

PICAXE-28X2 (40X2) Compiler
Version 3.4
Copyright (c) 1996-2016
Revolution Education Ltd

Searching for hardware on COM3

PASS - firmware PICAXE-28X2 (40X2)

And in a dialog box it showed the following:

Firmware Check Successful

PASS - firmware PICAXE-28X2 (40X2) vB.1

So I guess that is a good sign. And I do get 5v out of pin (leg) #25.

I tried measuring the voltage between B.4 (leg 21) and ground and I found 0.57v while the program was supposedly running, and it does not vary, even though it is supposed to change every second (on & off).

I followed your answer 1a) and the onboard LED lights up. However, I am still having difficulty choosing which drawing applies in Manual 1, page 49 , under Testing the System so I can at least control an external LED. Sorry for all the questions.

Lorne Wilkins
 
Last edited:

inglewoodpete

Senior Member
And in a dialog box it showed the following:

Firmware Check Successful

PASS - firmware PICAXE-28X2 (40X2) vB.1

So I guess that is a good sign. And I do get 5v out of pin (leg) #25.
The firmware version (vB.1) indicates that the module (AXE200) has an older chip, using the discontinued PICAXE-28X2-5V (PIC18F2520) part. Refer to http://www.picaxe.com/Hardware/PICAXE-Chips/PICAXE-28X2-microcontroller/ (Revision History tab). As a result, just a few features of the later 28X2 chip will not be available to you. (From memory, "Touch" input ability is not available; Also ADC needs configuring differently to the later model). You should find the module to be very powerful, regardless. The 28X2 is my preferred workhorse.

I think both drawings on page 36 or Manual 1 are relevant to your module. The first diagram describes the features on each pin (with some, like Touch not available to you). The second drawing indicates the function of each on-board chip on the module's PCB. Being an earlier module, your chip layout may be a little different.

Please post the code that you are using in your attempts to get the LED to flash.

Peter
 

hippy

Technical Support
Staff member
4) If I wanted to switch on and off the onboard LED (pin 3?) how would I program that? It doesn't seem to follow the standard Port.Pin convention. On page 2 of the Getting Started document it says I could connect it to an output pin but would I have to use a 330 ohm resistor?
The module's on-board LED is controlled by the leg 3 input to the module. It includes an on-board 330R so all one needs to do to get it to light is to connect leg 3 to a positive voltage or high signal.

The lED can be used as a 'power on' indicator by wiring leg 3 direct to +5V (leg 25).

Or it can be controlled by a PICAXE output by connecting leg 3 to a PICAXE output pin leg. For example, connect leg 21 (B.4) to leg 3 (LED) and the LED can be controlled by HIGH B.4 / LOW B.4 / TOGGLE B.4 commands. There is no need for an additional 330R as one is already fitted on-board. Using one should not cause any issue though other than lowering the LED brightness.

To drive an external LED from B.4, connect leg 21 (B.4) through a 330R to the LED anode, and connect the LED cathode to 0V.
 

lornetw

New Member
Thank you inglewoodpete and Hippy. Here is the code I'm trying to get working (I took the lazy man's way and used the code on page 49 from Manual_1 and then used the X2 Conversion Wizard):

#define for28X2
' #define for40X2

' Converted by X2 Conversion Wizard Version 2.1.1

#ifdef for28x2
#endif

#ifdef for40x2
#endif

#ifdef for28x2
let dirsB = %11111111
let adcsetup = 0
#endif

#ifdef for40x2
let dirsB = %11111111
let adcsetup = 0
#endif

Main:
high B.4
pause 1000
low B.4
pause 1000
goto main


When I run the simulator, it steps through this program without any error messages (the simulated LED turns on and off).

Another possibility occurred to me - is it possible that even if the firmware check says the 28x2 is OK that somehow I burned out the B pins? I will try to use the A or C pins to see if this makes a difference. I will also try Hippy's suggestion regarding controlling the onboard LED.

I tested both my 330R resistor and my red LED and both work. BTW, the Picaxe Editor says my program downloads correctly but when running my program and checking the voltage at B.4 (leg 21) with a DMM, the voltage stays at 0.57V.

Regards,

Lorne Wilkins
 
Last edited:

hippy

Technical Support
Staff member
It seems unlikely inserting the module upside down would have burned out B.4. It is more likely to have taken out A.0 and A.1 but does perhaps depend on what it was connected to.

Try this code. It should turn all port B pins on and off. Check which B pins are changing which are not. This will help clarify what the situation may be -

Code:
#Picaxe 28X2
Do
  dirsB = $FF : pinsB = $00 : Pause 1000
  dirsB = $FF : pinsB = $FF : Pause 1000
Loop
 
Top