How can i take D-Flip Flop Output in order to use it for mathematical operation (in C- programming )?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello Every one,

   

I am little lost, please help me!

   

I have two flip flops connected togather (see attachement). I want to take the output (q-  terminal) of these two flip flops and perform some mathematical operations e.g multiplication, inside software (by writing C-code). The problem is, how i can store or take these output in side creator?

   

I attached a pic of my thing.

   

Looking forward for your reply!

   

Regards

   

maknight

0 Likes
1 Solution
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Just route the outputs to a status register. You can use this register then to read the values in your code.

View solution in original post

0 Likes
5 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Just route the outputs to a status register. You can use this register then to read the values in your code.

0 Likes
Anonymous
Not applicable

Hi Hli,

   

Thankyou for your reply.

   

So this means if i want to store out_put_1 into "unit8 output " variable. Then i have to do this by calling it from status register?

   

Can you share an example code for it?

   

Looking forward for your reply!

   

Regards

   

maknight

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

I would route both DFF-output to the (2-bit) status register. The just use StatusReg_Read() to get the value.

   

I suggest also to read the component data sheet for the Status Register.

0 Likes
Anonymous
Not applicable

I attached the pic, what i understand from your suggestion. Please correct me if i am wrong.

   

Looking forward for your reply.

   

Regards

   

maknight

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Code-wise this looks fine.

0 Likes