Keyboard troubles 2

Blaize110

New Member
After posing in the wrong section, here is my relocated post:

I am relatively new to PICAXE and this my first (now 2nd) post on the forum:

For my GCSE Electronics project, I am making a circuit that will read a keyboard input. I have wired my PIC up as detailed in the manual under the keyled section: Inputs 6 and 7 with the 4k7 resistors to +5v. I then used the example code given in the keyin section to read the keystrokes:

main:
keyin
if keyvalue = $32 then swon1
goto main

swon1:
high 1
goto main


After dong all of this, it doesnt appear to work.

Can anyone see what i'm doing wrong or why this isnt working??
Thanks
 

Technical

Technical Support
Staff member
Try doing this whilst testing, it will show on screen if you are getting any hits.

Code:
main:
keyin
debug
goto main
How is your hardware setup? If you are using a Rev-Ed project board have you accounted that it may have a 10k pulldown resistor by default on the board?
 
Last edited:

BeanieBots

Moderator
What does "not working" mean?
What isn't working?
How do you know it's not working?
What did you expect to happen?
Any error messages?
Does the program download OK?
Which PICAXE are you using?

You know your project. It's in front of you.
We can only guess what you have in the way of a circuit. What you may or may not have tried.
 

Michael 2727

Senior Member
Jee you ask a lot of questions BeanieB :p

You forgot to ask if they know -
Which way the pointy end of a diode goes in a circuit ?
and
Can they tell the difference between the Anode and Cathode
in a common 1K, 0.25W Resistor ?

There's nothing like taking a week to explain that resistors
limit current, not voltage, to a lump of Plasticine :(

The more information you can supply on your setup -
The better your answer will be.

I'm not having a go at individuals, applies to everybody,
help us help you.

BTW welcome to the forum :)

I only bite when I'm outa coffee.
 

Blaize110

New Member
Some answers

Thanks everyone,

'not working' means that output 1 isnt going high when i press the b key ($32).
It downloads fine and there are no error messages. There are no pulldown resistors either. It is a PIC 18X or A (depends on which prototyping board I use) but both seem to be fine with keyin.

The board is at school but I will try debug on monday.

There are some small buffering resistors (ill check the value on monday) on all of the inputs. Would these make much difference?
 

BeanieBots

Moderator
I've no idea what a "buffering resistor" is! (pull-up/down current limt???)
A "buffer" is normally a device/circuit put between a source and a load to prevent the load from affecting the source.

The keyboard MUST have pull-up resistors.
Check that the board you using does not have pull-down resistors fitted.
Use the program suggested by Technical to check that the keyboard is working and 'see' which vale is returned for each keypress.
 

Technical

Technical Support
Staff member
The 'buffering' resistor is probably a small resistor in series, some schools do this on inputs in case of short circuit whilst tinkering. It should be alright as long as it is low value (less than 1k)
 

Blaize110

New Member
Thanks

IT WORKS!!!

After weeks of lessons spend trying to figure it out, it finally works. :D

It was because the prototype board had 1k buffering resistors which weakened the signal and when I made a breadboard I had been forgetting the resistor on the reset pin. I finally remembered it today and have a working circuit.

Thanks to all for your help.
 
Top