Picaxe 08 floating inputs

bigr

New Member
Hi All,

I made a simple timer circuit with a picaxe 8 pin. Outputs are to a beeper and an LED. I only defined outputs c.2 and c.4, pins 5 and 3. I am mounting it on a small circuit board on a socket. It doesn't work or has random outputs. When I put the programmed chip back into the proto board pcb (with the programming resistors, jumper, etc.) it works.

I know that some inputs should be grounded. Can I just ground all the unused pins? Do I have to define the other pins in the program as inputs or outputs? I don't need to program the chip in the circuit so don't need the stereo socket or pull up resistors.

Thanks,

John in Arizona
 
Wire your circuit with a 20k resistor from the serial Input pin C.5 (Pin2) to 0v, if left floating the internal circuit could get noise on its input and think the serial programmer is trying to communicate with the chip; Or make sure your code uses a disconnect command.
 
I've seen the same and found that anything up to 100k has been sufficient for Serial_In, to stop it from thinking a download has been initiated. For other spare pins, you could always set these as outputs if you have already made the circuit board and these pins are unconnected.
 
Program pin needs to be LOW. Other pins I use 'WPU' to make use of the built in pull up resistors.
pokesfr %10001100, %00xxxxxx 'WPU On %Command, %Mask
I use this line almost everywhere these days as it is quick, 'programmable', saves soldering resistors and the cost @ 3 cents each .
This saves a heap of PCB and solderless breadboard layout and circuit complexity e.g.
WPU can even be used to dimly illuminate an LED connected to Pin 3 of an 08M/2, I2C pins, It can make a simple LDR to or Thermistor to -ve basic potential divider. It powers a DS18B20 nicely too eliminating the need for messy 4k7 resistor between the dat and +ve pins. You can have all sorts of almost zedro component count fun like this with just a battery + 08M2 chip and a handful of DS18B20. 5 DS18B20 is my record so far ;)
E.g.
pokesfr %10001100, %00011110 'WPU On %Command, %Mask pins = WPU active on pins 1,2,3,4
readtemp 1,w0
readtemp 2,w0
readtemp 4,w0
pokesfr %10001100, %00001000 'WPU OFF ( leaving just pin3 high saves a heap of uAmps idle power )
The ~ few 10's of kOhms per pullup works fine for short sensor leads. 4k7 Will be needed for > 5m cable runs
 
Back
Top