Hey guys, I have this cool output miltiplier that can hold memory and be expanded to any size tha uses shift registers and D type flip flops but I am having trouble finding something to use it for.
Any body got any idea on what to apply it?.
Im thinking robotics but Im not shure, I attache a video sample of the multiplier and the schematic in case anyone wants to build it and send feedback.
Here is a test code for the miltiplier, common pin is the arduino negative.
#include<Streaming.h>
int data = 3; //Declare data pin//
int clk = 4; //Declare clock pin//
int buf = 5; //Declare buffer enable pin//
int c = 1; //Declare counter variable//
int i = 1; //Declare intial position variable//
int s = 24; //Declare stop position variable//
int d = 1; //Declare data variable//
int t = 20 ; //Declare time variable//
void setup() {
pinMode(data, OUTPUT); //Set data pin to output//
pinMode(clk, OUTPUT); //Set clock pin to output//
pinMode(buf, OUTPUT); //Set buffer enable pin to output//
Serial.begin(9600); //Start serial port transmition//
}
void loop() {
for(d=i; d<=s; d++) { //Increase data variable//
Input(); //Call for sequence run//
Serial << "Data Place is: " << d << endl; //Print data to serial port//
digitalWrite(buf, HIGH); //Set buffer enable to 1//
digitalWrite(buf, LOW); //Set buffer enable to 0//
}
for(d=s; d>=i; d--) { //Decrease data variable//
Input(); //Call for sequence run//
Serial << "Data Place is: " << d << endl; //Print data to serial port//
digitalWrite(buf, HIGH); //Set buffer enable to 1//
digitalWrite(buf, LOW); //Set buffer enable to 0//
}
}
void Data() { //Data print routine//
if(c==d) { //When counter equals data position//
digitalWrite(data, HIGH); //set data pin to 1//
}
else { //On data and conter not match//
digitalWrite(data, LOW); //Set data pin to 0//
}
}
void Input() { //Buffer run routine//
for( c=1; c<=s; c++) { //Increase counter to last position//
Data(); //Call for data print routine//
digitalWrite(clk, HIGH); //Set clock pin to 1//
delay(t); //Delay betwen steps//
digitalWrite(clk, LOW); //Set clock pin to 0//
}
c=1; //Return counter to 1//
}
