Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

logic gate and other things

Status
Not open for further replies.
hi im working on a pic program wich is a stop clock/24 hour clock/alarm clock with 6 chips (18 pin, it would have been soooo much easier with two more output and two more inputs grrrr :lol:) and 6 seven segments for my school GCSE project. i have alredy made the pics program and all i need to know is if there a logic gate that does

A|B|o(output)
1|0|1
1|1|0
0|1|0
0|0|0

i need this for the alarm part where i have the variables count 24 hours then to give an output from the first(or last depending how u look at it :p) 7 seg that only counts one and two so i will use the normally unused out put to turn on a radio.

the other help i need is the radio, i have looked for a design but i cant find a useful one, really all i want is a fm radio with a llinear potentiometer to command the frequency.


also does any one have the design of a 7 seg, just so i know where the +/- go when i draw up my curcuit diagram.

if any one wants to see my finished desing ,just ask but i cant do the programming till im back at school.
 
You already seem to have far more chips than required, you can easily do the logic functions in the PIC software - no need for any extra chips.

One 18 pin PIC might be pushing it a bit, but certainly two (or one 28 pin) could do the job easily - I can't believe you used six!.
 
erm, im using a spread sheet program and i dont know how to code, and i dont think it can be done on the one im using. its called pic logicator. also i can only get 18 pin ones. ne way how could you have all the 7 segs working at the same time using one or two chips, unless you have a 28 pin one with loads of outputs????? 6 pic, one for each seg.
 
It seems that you are using an excavator to dig a hole where only a spade is required. Only one 18-pin pic is required if you bother to read up on coding. The 7-segment displays could be multiplexed, and the logic implemented easily in software.
As for the logic gate you are searching for, there's no such one. Pick up a book on elementary boolean algebra, and you could probably devise one after reading the very first chapter.
What you need is
A AND (NOT B) or equivalently, (NOT A) NOR B
This can easily be achieved using a NOR gate with input (NOT A) and B, where the NOT operation could be carried out using another NOR gate (With A and 0 as inputs). Since 2-input NOR gates usually come in quad packages, you would only need a single IC.
 
im gunna have to do that, but i will have to make it out of NAND gates coz we cant get NOR ones at our school. the other thing is that i CANT code beacuse i have never been shown, and unless someone sows me i got to do it this way. is there anywhere i could have very simple toturials to code? last thing, what is mulitiplexed? if it means that the 7 segs stay on even when theres no constant input ot it which is what i have now, (ie. 7 outputs for each segment and the last to tell the next chip to start counting or whateva) then i could do that even with the poic logicator software very easy.
 
-=GST=- Nemisis (cs/cz) said:
im gunna have to do that, but i will have to make it out of NAND gates coz we cant get NOR ones at our school. the other thing is that i CANT code beacuse i have never been shown, and unless someone sows me i got to do it this way. is there anywhere i could have very simple toturials to code? last thing, what is mulitiplexed? if it means that the 7 segs stay on even when theres no constant input ot it which is what i have now, (ie. 7 outputs for each segment and the last to tell the next chip to start counting or whateva) then i could do that even with the poic logicator software very easy.

Multiplexing is a common procedure, your existing design uses 7 pins per display, with 6 displays that's 42 pins required. Multiplexing the display would reduce that to 13 pins (7 + 6, rather than 7 x 6) - a massive difference!.

Multiplexing is short for "time division multiplexing", it means you select each display in turn, one after the other - so you have the seven segments all connected together, and use other PIC pins to select the particular display you want. By doing this fast enough it gives the impression of a permanently lit display.

One of my tutorials shows how to do this for a double 7 segment display.
 
righti can see how that works but there another problem, how would i get the outputs to switch between each 7 seg?

like i can say, switch to seg1, do time 9 seconds, swich to seg2 show 1 switch to seg 1 again, do time 0.1 (or something stupidly fast) seg2 show 1, do time 0.1, and so on. is this what you mean?
 
-=GST=- Nemisis (cs/cz) said:
righti can see how that works but there another problem, how would i get the outputs to switch between each 7 seg?

like i can say, switch to seg1, do time 9 seconds, swich to seg2 show 1 switch to seg 1 again, do time 0.1 (or something stupidly fast) seg2 show 1, do time 0.1, and so on. is this what you mean?

Yes, that's the way - in my tutorial I cheat somewhat, as I only use two digits I use one pin to toggle between them - I did this simply so it would connect to a single 8 pin port, in keeping with my tutorial design boards.

For your 6 digits you would use six pins, selecting them one at a time. You could use the same basic method as my tutorial, a timer interrupt generates the multiplexing frequency, and the interrupt routine displays each digit in turn, one each time it's called.
 
that sounds very hard, or at least, very hard to get ot grips with coz im sure its easy once u get going. the only thing is i cant code, i already have a design. it alows me to have a stop watch cprogramable clock and programable timer, even if it does use alot of chips, hey im not paying for them :p also this is a gcse project, have a clock even if it does use 6 chips probably wont affecy me till im old. non the less i will look at what uve done and i will do my best to learn code, as electronics is a fuure carrer prospect for me i have plenty of time to learn, after all im only 15 :)
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top