Advertisement

How to communicate with a hardware? NOOB here.

Started by December 19, 2008 12:22 PM
54 comments, last by macmoy 15 years, 9 months ago
what? so in this simple project, I need a programmable IC?
I only have, AND gates,OR gates,NOT Gates,NOR gates.

those programmable ICs are those ICs that you must burn right??
BUT, it costs 58,000pesos here!! im still a student.huhuhuuhu

But, can I make the same drumset without Programmable IC?
how? using only AND,OR,NOT,etc gates?
is it posible?
helllllp.
is it posible to make it without programmable ic? just and,or,xor,not,etc gates?

i think resistors and transistors will control the voltage for the signal sending to the PC(via receive data pin of PC). am i correct?

What book can you recommend me to read? anyone have ebook of it?

please, help..
Advertisement

So far, this is what I have made.(see the image above?)

when piezoA is hit, the flow from Data Terminal Ready(DTR) is connected to CTS.
(im sorry,the image is wrong, it's Clear To Send(CTS) instead of RTS)

My program in Visual Basic 6 has:


If MSComm1.CommEvent=comEvCTS Then 'this means, there's a change in CTS
If MSComm1.CTSHolding=True Then 'this means when signal is on.
Call PlaySnare()
End if
End if

------------------
The PROBLEMS are:
------------------
There are only 4 input pins.(CTS,DCD,DSR,RI)
The drums set must have 8 pads.
Those pads(PiezoA and PiezoB) cannot be hit at the same time.
The sound that will come out to the PC Speaker is the one that was hit first.

Because of these problem, I think I must use the right approach(which is using the Receive Data(RD) of the PC.These is about sending 8bits + 1 parity + 2 Stopbits right?
So How Will I make my device send that sequence?

Questions:
Can I make it without using Programmable IC?(i dont have IC burner)
Can I make it only using AND,OR,NOT,NOR,XOR gates?
If Yes, Will it support the hitting of the pads at the same time?
Will I be needing Battery attached to my Breadboard? or the current from the PC is enough?
Hi,

Basically if you really want to do this with discrete logic, what you need is a shift register, which(as I imagine you know) is a chain of flip flops(in your case you'll want 8 for the data bytes to attach to your pads, however many stop bits you have and if you really fancy an exercise in boolean logc however many parity bits :) ).

Shift register

Then you need to implement a suitably accurate clock to drive it at your chosen baud rate etc etc. I built something like this to drive a PSX controller interface and it was a massive pain even though in that case the clocking is taken care of by the PSX.

As many other people have said, I really recommend using a microcontroller, I've never used PICs myself but I can recommend both the ARM7 and 8051 device families which tend to be serial programmable so you don't need an expensive programmer and available in every configuration you could possibly want. I do realise that these might be difficult to get in the phillipines, but by the time you've ordered all the discretes to build this you might as well buy a microcontroller evaluation board which'll save you a lot of pain and have a board to re-usable for future projects.

Using C, doing what you've specified would be as simple as this vague pseudo code!

void main(){   /* Configure IO port 1 for general purpose input here */      /* Configure serial interface here */   while(0)   {        /* Get state of P1 */        unsigned char padState = P1;                /* Write this to serial port output register */        SO1 = padState;   }}
I dont get it! sorry.

microcontrollers? it is programmable? how? i dont have ic burner.
and what is the microcontroller development board?is it the ic burner?
please, explain it deeper, i dont know what to do. All i know as of the moment is in the picture in my previous post.thats all. i still dont know how to send bits to the computer. all i know is connect the DTR to any input(e.g. DCD) then determine whether dcd has signal. ofcourse, there is, because DTR is connected to DCD. then i'll play the snare. that's all.

so please, let me know what to know.
Microcontrollers are just single-IC programmable computers. Evaluation boards save you the hassle of building your own PCB to test your microcontroller application on. For instance I can recommend this board Example evaluation board It provides you with loads of general purpose IO(for instance for connecting your pads), 2 ready-configured serial ports, various buttons and knobs for testing stuff out and albeit a crippled version of the pretty awesome Keil IDE for writing and simulating embedded C applications.
Advertisement
ah, but is it posible if i dont use microcontrollers? can i just use resistors,transistors,logic gates,etc.? because i dont have enough money to buy those.
Yes! As I said you could build a shift register, preferably using ready made flip flops but otherwise with (a lot of) discrete NAND logic.
this is how i understand it.

in 9600 baudrate.
the device is sending signals(on 1 pin, RD) consecutively.
e.g.

send 1 -
send 0 |
send 0 |
send 1 | - > 8 bits
send 0 |
send 1 |
send 0 |
send 1 -
send 1 - stopbit

it depends on the baudrate how long to stay on a particular bit.
e.g.
send 1 - from 0sec to 1/9600th sec.
send 0 - from 1/9600th sec to 2/9600th sec.
..
..


Am I thinking correctly?

the question is, how will i send those bits?(how can i manage the voltage?)
AND how will i know, when it is time to send the next bit?the clock? how to use it? what are the things needed?
shift register? i slightly understand how it works but i can't implement it because i dont know how to send bits to the pc. even 1 bit.

by the way,is it easier for me to make this digital drumset if I use 25 pins? rather than 9 pins?

rs232 25pins is also called as the parallel port?? also called the printer port?? is it correct?? (please answer this one.)

This topic is closed to new replies.

Advertisement