New to picaxe (Chip factory)

Immemorial

New Member
Hello,

I'm relatively new to picaxe and came here to request some help. I'm using the chip factory software to create a double safety switch -A system where the user must press two buttons within a certain time limit (say 2 seconds) of each other. Pressing switch 1 should start the timer and light one of the LED's, failing to press switch 2 within the time limit should turn off the LED. Pressing switch 2 within the time limit will turn on another LED. Ideally the switches should be pressed together at the same time.

This is what I have came up with so far, like I said I'm just starting out and have very basic understanding of PIC.

I have exported the .chp file to basic below.

Code:
'Chip Factory BASIC Conversion
'(c) Revolution Education Ltd 2001
'www.rev-ed.co.uk
'BASIC program output is suitable for PICAXE system.
'(NB. All sound commands are mapped to output pin 6).

line00: 	if pin2 = 1  then line01
line01: 	if pin2 = 0  then line00
line02: 	if pin2 = 1  then line02A
	goto line03
line02A:	high 1
line03: 	if pin2 = 1  then line08
line04: 	if pin2 = 1  then 
line05: 	if pin3 = 1  then line12
line08: 	if pin3 = 1  then line08A
	goto line09
line08A:	high 2
line09: 	if pin3 = 0  then line08
line10: 	if pin3 = 1  then line00
line12: 	if pin2 = 1  then line12A
	goto line13
line12A:	high 1
line13: 	if pin3 = 1  then line13A
	goto line14
line13A:	high 2
line14: 	goto line00
The part that I'm stuck with is adding a timer to the program in order to achieve the above, is this possible using chip factory via the software and the chip factory programmer? At this moment the program only turns on the LED's.

Any input is very much appreciated. :)
 

Immemorial

New Member
Thanks for the fast reply, that's a shame really. I have a PIC interface/software available here, does it use the same syntax as chip factory? Would a simple copy over suffice?

Thanks again ;)
 

manuka

Senior Member
Immemorial: You don't mention the need level or rationale, but as PICAXEs suit incremental "cut & try" programming I for one would say "Roll up your sleeves & try it the real thing on a breadboard". A good browse of Rev.Ed's great manuals will also help !
 

westaust55

Moderator
Thanks for the fast reply, that's a shame really. I have a PIC interface/software available here, does it use the same syntax as chip factory? Would a simple copy over suffice?

Thanks again ;)
While the program as converted to PICAXE BASIC that you posted will be familiar to most users here (the line numbers appear as labels) most will have no idea of what commands and timing functions are available for this early system.

The last price list is dated 2003 - 8 years ago
The software download page no longer exists.

Seems there is a WAIT command with a resolution of 0.1 seconds

The manual is available here: http://www.rev-ed.co.uk/docs/chi001_manual.pdf


Is there anything stopping you changing over the newer PICAXE chips for your project?
The 18X or even 18M2 are 18 pin chips to replace the 16F627 that may likely drop into your existing project board
 
Last edited:

Technical

Technical Support
Staff member
The Chip factory is now an obsolete system no longer supported. You could do your project with a PICAXE but would need a PICAXE download cable/PICAXE chip (not the Chip Factory programmer, which cannot be used with the PICAXE system).
 

Immemorial

New Member
Immemorial: You don't mention the need level or rationale, but as PICAXEs suit incremental "cut & try" programming I for one would say "Roll up your sleeves & try it the real thing on a breadboard". A good browse of Rev.Ed's great manuals will also help !
The code is actually for a press machine, having the timer is to prevent people from taping down one of the buttons and pressing the other manually. Both buttons have to be pressed at once in order to operate the machine. I'll have a look through the manuals, thanks!

While the program as converted to PICAXE BASIC that you posted will be familiar to most users here (the line numbers appear as labels) most will have no idea of what commands and timing functions are available for this early system.

The last price list is dated 2003 - 8 years ago
The software download page no longer exists.

The manual is available here: http://www.rev-ed.co.uk/docs/chi001_manual.pdf


Is there anything stopping you changing over the newer PICAXE chips for your project?
The 18X or even 18M2 are 18 pin chips to replace the 16F627 that may likely dop into your existing project board
We are currently looking through the newer chips, thanks for your reply!
 

Buzby

Senior Member
I do hope this is for an educational project, not a 'real life' 200 ton machine press.

Neither PICAXE, or the underlying PIC microchip, is rated for safety critical system usage.

( In fact, I would never trust any single-chip solution to a task such as this. )

However, a solution which only uses one timer would be to at the first switch press start a loop of 20 times, with a 100mS pause each pass.

At each pause check for the second switch. If you get to 20 with no second switch detected, wait for both switches released, then start again.
 
Top