6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 12:19 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Apr 11, 2011 9:37 am 
Offline

Joined: Mon Apr 11, 2011 9:30 am
Posts: 2
Location: Australia
Name mux ;
PartNo 00 ;
Date 11/04/2011 ;
Revision 01 ;
Designer Engineer ;
Company University of Tulsa ;
Assembly None ;
Location ;
Device V2500C ;

/* *************** INPUT PINS *********************/
PIN 1=clk ; /* */
PIN 3=x ; /* */
PIN 4=r1 ; /* */
PIN 5=r2 ; /* */
PIN 6=r3 ; /* */
PIN 7=r4 ; /* */

/* *************** OUTPUT PINS *********************/
PIN 9=z ; /* */
PIN 12=q0 ; /* */
PIN 13=q1 ; /* */
PIN 14=q2 ; /* */
PIN 15=q3 ; /* */
PIN 16=q4 ; /* */
PIN 24=q5 ; /* */
PIN 25=q6 ; /* */
PIN 26=q7 ; /* */



/*mux*/
z=!q6&!q7&r1 # !q6&q7&r2 # q6&!q7&r3 # q6&q7&r4;

/*shift Register */
q0.d=x;
q1.d=q0;
q2.d=q1;
q3.d=q2;
q4.d=q3;
q5.d=q4;
q6.d=q5;
q7.d=q6;


on my program when i change q6 and q7 i only get the vlaues of R1 on my out put Z, can any one please help me with it ???? :( :( :(

_________________
juda


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Apr 11, 2011 1:02 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
I have not used that device, but have used WinCUPL.

So, if I read this right, serial data is being shifted in on the x input using the clk input as the shift clock. Bits move from Q0 to Q7.

The z output is Q6 AND'ed with Q7, using R1 thru R4 to select all combinations of inverted/non-inverted Q6's and Q7's.

Only one of R1 thru R4 should be held high at any given time.



So, in order to test this, you need to clock data into x to fill Q6 and Q7. (8 clocks total)

Then, stop clocking and sequentially set R1 thru R4 high and read the results on z.

Here's one example:

With Q6=0 and Q7=1, you should see this:
R1 z=0
R2 z=1
R3 z=0
R4 z=0

Does this help?

Is this what you are doing, or are you doing it differently?


Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 12, 2011 5:01 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8505
Location: Midwestern USA
jude00 wrote:
Code:
/*mux*/
z=!q6&!q7&r1 # !q6&q7&r2 # q6&!q7&r3 # q6&q7&r4;

Adding some whitespace here and there helps old eyes like mine read your code, e.g.:
Code:
/* mux */

z = !q6 & !q7 & r1 # !q6 & q7 & r2 # q6 & !q7 & r3 # q6 & q7 & r4;

It may be necessary to parenthesize expressions, e.g.:
Code:
/* mux */

z = (!q6 & !q7 & r1) # (!q6 & q7 & r2) # (q6 & !q7 & r3) # (q6 & q7 & r4);

You should check WinCUPL's evaluation precedence rules to make sure the compiler is seeing your logic the way you want it.

:-)

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Apr 19, 2011 7:18 am 
Offline

Joined: Mon Apr 11, 2011 9:30 am
Posts: 2
Location: Australia
thanks

_________________
juda


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 28 guests


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 post attachments in this forum

Search for:
Jump to: