Unused Pin's

reaper7

New Member
Just a quick question regarding unused input/output pins, do they have to be tied to ground if unused.
I have been building all my test circuits on the AXE091 picaxe development board with no problems all working ok. But if i build the same circuit on breadboard they don't seem to work?

The Pic18x code is as follows: (Receiving serin data from a PIC40x1 (Interupt) on the AXE091 Development board via Pin17 (in0))
As I said works when both Picaxe's are connected via the AXE091 development board, but when the Pic18x ir removed from the development board to its own circuit nothing...

PowerOnReset:
setint 1,1

MainLoop:
if b0 = 1 then gosub LEDOn
if b0 = 0 then gosub LEDOff
goto MainLoop

Interrupt:
serin 0,T2400,b0
setint 1,1
return

LEDOn:
low 7
high 4
pause 1000
low 4
high 7
pause 1000
return

LEDOff:
low 4
low 7
return


Led is BiPolar hence why pin 10 and 13 are used.
 

Attachments

Last edited:

SilentScreamer

Senior Member
Just a quick question do unused input/output pins have to be tied to ground if unused.
I have been building all my test circuits on the AXE091 picaxe development board with no problems all working ok. But if i build the same circuit on breadboard they don't seem to work?
Inputs - No they do not so long as the code never refers to them.
Outputs - NEVER tie an output to +V or 0V, you'll destroy the PICAXE.

Can you post a photo of your breadboard, I expect the mistake is there.
 

tiscando

Senior Member
It's best to tie input pins to gnd via a resistor (idealy 4.7k) to prevent floating which causes higher power consumption.

Do not tie output pins (or any pin that can be turned into an output) directly to any power rail.

EDIT: A lot of the circuitary problems on my breadboard are due to bad connections, so it's best to use solid wire with tinned ends (which look like resistor leads) rather than with bare copper ends, which oxidize, causing unreliable connectivity.

edit2: 330k for the Rx pulldown resistor may be too high, so I would suggest to try between 10k and 100k on the breadboard.
 
Last edited:

hippy

Ex-Staff (retired)
If it works in the AXE091 but doesn't when removed the most likely candidates IMO are -

1) No 4K7 pull-up for reset
2) No 10K/20K download interface
3) 0V of both not connected together
4) Miswiring
5) Forgetting to power the chip up
 

reaper7

New Member
Ok rebuilt the circuit as simple as possible, now just trying to flash an LED using the following code:

MainLoop:
high 4
pause 1000
low 4
pause 1000
goto MainLoop

Still nothing led behaves erratic flashing randomly or staying on?

Any ideas :confused:
 

Attachments

Last edited:

SilentScreamer

Senior Member
Still nothing led behaves erratic flashing randomly or staying on?
I have had this problem before from dead batteries. The current drain was too high and caused the PICAXE to keep resetting. Does replacing the batteries help? (assuming you're using a battery power supply)
 

hippy

Ex-Staff (retired)
There doesn't seem to be anything obviously wrong with the breadboard layout. The LED always on suggests Output Pin 4 is being held low, which could be happening on reset or when it thinks it's had a download. It sounds like it could be a loose connection.

One thing you can do is take a wire from Serial Out of the 18X ( leg 2 ) and jump that to an unused Serial Out of another PICAXE socket on the AXE091 ( say leg 7 of the 08M ), plug the download cable into the appropriate jack for that socket, add a SerTxd to your code, fire up the Terminal of Programming Editor, see if it is repeatedly resetting ...

SerTxd("Reset",CR,LF)
Do
Toggle 4
Pause 1000
Loop
 
Last edited:

reaper7

New Member
OK tried that first i used Terminal with the Pic18x thats mounted in the AXE091

I get the following on reset (Using 4800,n,8,1)
Reset

But when I connect Pin2 of The breadboard Pic18x to pin7 of the unused 08m socket and connect the download cable to it - Terminal shows no activity even when manually reseting.
 
Last edited:

reaper7

New Member
Working at last

Ok all is now working.
Connected a battery pack as the power source and it started working???
Any reason why the 4.97 volys i'm reading from the V+ and 0V connections on the AXE091 are causing problems when connected to the breadboard to power the circuit :confused:
 

hippy

Ex-Staff (retired)
I don't see why that wouldn't work and it's how I have my setup here when putting stuff on the breadboard.
 

reaper7

New Member
Don't understand it myself. Reading 4.95V of the AXE091 of the connector strip on the right hand side of the board.
But when I use it to power the PIC18x the circuit wont work but connect a 4.1v battery (Drained from 4.5V to 4.1V) it works ok.

Have now connected a 805 voltage regulator into the circuit powered from the 5v DC connector on the AXE091 and it also works ok?

Would the AXE091 have a problem with not supplying enough current:confused:
 

SilentScreamer

Senior Member
I would have thought it would be fine, however that appears (to me at least) to be the problem. Broken/faulty component on the AXE091 perhaps?
 

hippy

Ex-Staff (retired)
It looks like a 1A regulator to me. Though I have an earlier version of the AXE091 I'm sure it's the same on the latest.

It may be worth doing a continuity check for the V+ and 0V pads.

You could try taking the power from the PICAXE sockets on the left. There should likely be 0V and V+ as lowest connections of the outside pins around the 18-pin socket, plus the 08M socket and outside pins are handy; top left V+, top right 0V.
 

reaper7

New Member
Have a LM7805 regulator on the board being fed from the 9V input to the board, which has it working ok.
May as well leave it there now as its happy :)

Thanks for all the suggestions, just happy its working now - was doing my head in as everything was adding up but just not working. :rolleyes:
 
Top