![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
Hiya, Just a quicky, Never done any 'serial work' before but I'm going to experiment with driving a 7 seg display via a 74HC164 serial to parallel (HC595 would be better but don't have any yet). Would it be best to use the 16f690s' SSP module (which looks quite complicated for a noob such as me) to send out the data or just use a regular output? ![]() Thanks in advance for any help. | |
| |
| | #2 |
|
The SSP module is really for the SPI and I2C forms of serial transmission. Your really want to start with the Eusart module - while using a decoder chip to the seven segment is a good exercise , it would also be a good idea to do a tutorial like Nigels RS232 example, you just need a Max232 chip, 5 caps and a serial lead to you PC - you can then use Hyperterminal a see you data coming and going. Be it SSP or Eusart that you use, the Datasheets info is terribly complex for anyone starting, so look around for simple good tutorials like Nigels - there are actually some good ones to be found on Microchips site - though as usual with them is a needle in a haystack job to find them. eg http://ww1.microchip.com/downloads/en/devicedoc/spi.pdf | |
| |
| | #3 |
|
You could use the SSP module if you want to learn to use it at the same time, but if you've not done much coding before it's probably good practice to just bit bang the shift register using a couple of I/O lines and some code. It's not terribly difficult, just compare each bit of the byte you're sending in series set the data line and enable on the shift register on and strobe the clock pin. Just make sure you meet the timing requirements for the shift register.
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." | |
| |
| | #4 |
|
wow that bread board is over complex Why so many IC? Im sure you can do it all with 1 74HC164 and the Pic itself. Im sure with that kinda setup you can do 2 7 segs no problem. Why use a decoder? You can do software decoding and then send it to the shift register. You can control the individual digits via transistors. Ill make you a nice schematic so you can see how i would set it up.
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #5 |
|
The 74HC164 is an 8bit shift register, two 7segments is 14 control lines if you're running them right off the shift register so you'd need 2, or you'd have to multiplex it. If the shift register isn't a latching register multiplexing the 7 segments with it is going to create lots of nasty flicker so much I don't think it'd be usable.
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." Last edited by Sceadwian; 26th May 2009 at 03:02 PM. | |
| |
| | #6 |
|
ive never tried it but im sure a decent speed PIC and shift register wouldnt cause a bad flicker.
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #7 |
|
The 74HC164 can run at speed up to 175MHz so i doubt a flicker will occur. Thats way faster than a pic can set a pin anyway. You can write to it as fast as a pic can write. I just noticed its not a latch type tho. But thats always something obtainable ![]() The "74HC595" would do it for you.
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics Last edited by AtomSoft; 26th May 2009 at 03:27 PM. | |
| |
| | #8 |
|
Hopefully Angry Badger followed all that =)
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." | |
| |
| | #9 |
|
Never noticed how cool the 74xx595 was. I might buy a few now ![]() (xx = LS or HC etc...) Here is a schematic using the 74xx595. Warning i chose to pullup SCLR/SCL to save a data pin on pic. Doing this will not allow you to do a 1 time clear on the register. But you can still just shift in all 0's and do a software clear. G is pulled down because all of the work you are doing will require it low anyway. If you have Eagle i also included the schematic file so you can see it better.
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics Last edited by AtomSoft; 26th May 2009 at 03:59 PM. | |
| |
| | #10 |
|
I like the 7 segment led driver makes a good display and don't use a lot of pins.
| |
| |
| | #11 |
|
Burt i love em too. Since he is a beginner i feel like maybe he should do it in a way where he can get more experience and a better understanding of how micros work and coding.
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #12 |
|
To drive two segments I'd waste lots of micro controller pins & do a standard multiplex routine & I'll leave SSP module to interface some other very useful device Last edited by Gayan Soyza; 26th May 2009 at 04:39 PM. | |
| |
| | #13 |
|
Although learning to interface to the decoder is good coding practice as well, 6 of one half dozen of the other =) Either way it'll work. Since he's got the decoder setup arleady might as well use it.
__________________ "Because I be what I be. I would tell you what you want to know if I could, mum, but I be a cat, and no cat anywhere ever gave anyone a straight answer, har har." | |
| |
| | #14 |
|
Hi Thanks for your replies, much appreciated. The 'board' isn't really that complicated - only three chips including the pic (one chip unused). The 164 doesn't have a latch facillity as you correctly noted so I'm using a 74HC373. I'm only driving one digit to start with to see how I get on. It's almost working - display changes every time I press the button but it's garbled, think I messed up the connections or something. NP. On my previous two projects I've driven the displays with parallel data, ccts / pics attached. Thanks. | |
| |
| | #15 |
|
Nice looking stuff dude. You cant be that much of a noob to do that. Good job. Can you post some code ? so we can help futher. Also a schematic of what you are on now. nice use of a 74HC373.
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics Last edited by AtomSoft; 26th May 2009 at 08:32 PM. | |
| |
|
| Tags |
| 74hc164, data, serial |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| Sending serial data | zenhuynh | Electronic Projects Design/Ideas/Reviews | 1 | 24th April 2009 02:38 PM |
| Difference b/n 74HC164 and 74HC4094? | picstudent | General Electronics Chat | 4 | 25th February 2009 03:50 AM |
| 74HC164 Shift Register Doubt | Gayan Soyza | Micro Controllers | 15 | 18th February 2009 03:54 AM |
| help on serial data transmission | srimannarayanakarthik | Electronic Projects Design/Ideas/Reviews | 3 | 3rd January 2007 03:01 PM |
| VB serial data | Kane2oo2 | Micro Controllers | 8 | 10th November 2003 11:15 PM |