Simple CHI030 problem?

I am attempting to link a CHI030 (old style) board with a 18M2 picaxe to several very simple input and output devices and it may just be getting late but I cannot seem to be able to make it work.

I have connected simple push to make switches to input marked 0-1-2-6-7, I believe that the RESET switch is really input 5 when using a 18M2, and LEDs to output marked 7-6-5-4.

If I use Logicator and use the ICE facility the LEDs can be turned on/off but only input 6 & 7 seem to work. I have tested the connected and switches and these seem to be fine. I have tried the Picaxe editor and that also fails to see the inputs on 0-1-2.

When I 'calibrate' the adc inputs the values change to 255 when I press the switch - I have no intention of using the ADC facility - just simple digital on/off inputs.

Can any see the wood for the trees - I'm sure that I am not seeing the obvious!

Thanks
 

nick12ab

Senior Member
When I 'calibrate' the adc inputs the values change to 255 when I press the switch - I have no intention of using the ADC facility - just simple digital on/off inputs.
And what do you get when you haven't pressed the switch?

Are there any pull-down resistors fitted to the inputs? Although the schematic in the datasheet claims that the board has a pull-down resistor pack this doesn't exist on the product photo on the product page. Technical? Hippy?
 
One gives 54 and the other 87. All I need is a simple digital on/off response and not and ADC value. I have not altered the board in any way. I read the datasheet and R7 is present but R8 is 'empty'. Will adding in a 10K resister solve this. So why are both acting up. All I need are the switches on 0 & 1 to produce a digital signal!
 
Last edited:

nick12ab

Senior Member
One gives 54 and the other 87. All I need is a simple digital on/off response and not and ADC value. I have not altered the board in any way. In other boards I have used I have only used resistors when I needed an analgue value.
You mean that you've never used a pull down resistor with a switch? 54 and 87 sounds like the input's floating.

Adding a pull down to each input should fix the problem.
 
I assummed that they were already added to this board -Ok I'm stupid! I have added 10k resistors, one was already there!
However the problem still remains. Input0&1 still are set up as analogue inputs and generate 0 and 255 when checked. What I need is the board is not to use ADC but ONLY digital on/off. How do I get ALL of the inputs on the board to be digital inputs.
 

nick12ab

Senior Member
However the problem still remains. Input0&1 still are set up as analogue inputs and generate 0 and 255 when checked. What I need is the board is not to use ADC but ONLY digital on/off. How do I get ALL of the inputs on the board to be digital inputs.
If they read 0 and 255 in analogue mode when the switch is not pressed and pressed then you will be able to use them as normal digital inputs.
 

hippy

Ex-Staff (retired)
If I use Logicator and use the ICE facility the LEDs can be turned on/off but only input 6 & 7 seem to work. I have tested the connected and switches and these seem to be fine. I have tried the Picaxe editor and that also fails to see the inputs on 0-1-2.
I'm not entirely familiar with the workings of the ICE program but it appears that for an 18M2 it is preconfiguring or only reporting inputs 0, 1 and 2 as analogue inputs, inputs 5, 6 and 7 as digital inputs, hence what you see using the display panels.

Within Programming Editor however you should be able to access all inputs as digital inputs. What program are you using within Programming Editor ? The following should show which of the inputs are high on an 18M2 ...

Code:
#Picaxe 18M2					
#No_Data
#Terminal 4800
		
Do
  If pinC.7=1 Then : SerTxd("7") : Else : SerTxd("-") : End If
  If pinC.6=1 Then : SerTxd("6") : Else : SerTxd("-") : End If
  If pinC.5=1 Then : SerTxd("5") : Else : SerTxd("-") : End If
                                          SerTxd("-")
                                          SerTxd("-")
  If pinC.2=1 Then : SerTxd("2") : Else : SerTxd("-") : End If
  If pinC.1=1 Then : SerTxd("1") : Else : SerTxd("-") : End If
  If pinC.0=1 Then : SerTxd("0") : Else : SerTxd("-") : End If
  SerTxd( CR, LF )
  Pause 500
Loop
 
Top