PLD Help wanted!
Electronics Forum Index Electronics
Circuits, theory, electrons and discussions.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web ElectronicsHelp.net
PLD Help wanted!

 
Post new topic   Reply to topic    Electronics Forum Index -> Electronics General
Author Message
slodgey
Guest





Posted: Sun Nov 06, 2005 12:48 am    Post subject: PLD Help wanted! Reply with quote

Hi All, I have recently seen a PCB that uses a GAL16V8 to control a 4x7
keyboard matrix. The company that made the PCB no longer exist and the
GAL is dead! It appears to me that the terminals 17-19 are used to
address the row and then read back the column.
I have no schematic for this PCB but this is how its been reversed
engineered.
Row 0-4 are on pins 13-16
Col 0-6 are on pins 2-8
Write pin 1
Read pin 9
D0-D2 are on pins 17-19
Keypad Interupt Pin 12
I have only ever used a PLD to do simple addressing and never used the
pins to be bi-directional. Can anyone help in showing me how this can
be achieved?

Many thanks

Back to top
petrus bitbyter
Guest





Posted: Sun Nov 06, 2005 1:35 am    Post subject: Re: PLD Help wanted! Reply with quote

"slodgey" <slodge1313@aol.com> schreef in bericht
news:1131216507.072084.205020@g43g2000cwa.googlegroups.com...
Quote:
Hi All, I have recently seen a PCB that uses a GAL16V8 to control a 4x7
keyboard matrix. The company that made the PCB no longer exist and the
GAL is dead! It appears to me that the terminals 17-19 are used to
address the row and then read back the column.
I have no schematic for this PCB but this is how its been reversed
engineered.
Row 0-4 are on pins 13-16
Col 0-6 are on pins 2-8
Write pin 1
Read pin 9
D0-D2 are on pins 17-19
Keypad Interupt Pin 12
I have only ever used a PLD to do simple addressing and never used the
pins to be bi-directional. Can anyone help in showing me how this can
be achieved?

Many thanks


That's not too difficult. The "output" cells have a product term that
controls the output. When activated, the corresponding output driver goes
tri-state but the internal feedback stays active. This way the pin can be
used for input. So the read pin (9) is used to keep D0-D2 (17-19) tristate,
then a pulse on write (1) is used to clock the (decoded) addresses into the
output cells (13-16) of the rows. Now the outputs of the component that
provided the row address are made tristate, then the read pin (9) is used to
release the tristate of the D0-D2 (17-19), at the same time putting the
encoded column on them.

So D0-D2 is a real bidirectional databus.

As for the interrupt, I guess it is activated when, after a write, the
column appears to be nonzero.

petrus bitbyter
Back to top
slodgey
Guest





Posted: Sun Nov 06, 2005 1:35 am    Post subject: Re: PLD Help wanted! Reply with quote

Many thanks, I'll give it a go!

Back to top
slodgey
Guest





Posted: Thu Nov 10, 2005 1:35 am    Post subject: Re: PLD Help wanted! Reply with quote

I still need help!
After trying, I now get an error of Invalid input pin 19. How do I
define these pins D0-D2 (17-19). Can anyone give me an example piece of
code to show me how to use these pins as bi-directional I/O.

Many thanks
Back to top
petrus bitbyter
Guest





Posted: Fri Nov 11, 2005 1:19 am    Post subject: Re: PLD Help wanted! Reply with quote

"slodgey" <slodge1313@aol.com> schreef in bericht
news:1131578069.659468.187950@z14g2000cwz.googlegroups.com...
Quote:
I still need help!
After trying, I now get an error of Invalid input pin 19. How do I
define these pins D0-D2 (17-19). Can anyone give me an example piece of
code to show me how to use these pins as bi-directional I/O.

Many thanks


What tool do you use? FAIK there is no need to specify the outputs for I/O.
You simply set the other outputs according to the value that appears on
these output pins (D0-D2). The older tools I'm aware of do not bother
whether that value comes from the output cells (when activated) or from the
bus (when the outputs are in tristate). Maybe newer tools like VHDL do check
this situation as they need it for simulation.

(Even then, I like a warning rather then an error report. Of couse you are
forced to specify correctly this way but I hate to be forced.)

Can you write (a part of) the code you've written along with the tool you
used for it?

petrus bitbyter
Back to top
slodgey
Guest





Posted: Wed Nov 16, 2005 5:35 pm    Post subject: Re: PLD Help wanted! Reply with quote

The Tool I use is for ATMEL PLD's (Win CUPL). I have now tried it on an
old version of this compiler and the error has gone! I haven’t had time
to program a device yet to try it, but things seem to be going in the
right direction!!
thanks
Back to top
 
Post new topic   Reply to topic    Electronics Forum Index -> Electronics General All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Home & Living New Topics
Contact Us
Powered by phpBB