![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| I just got the 16F628s I ordered, and I am trying to come up with a board that will allow me to control 8 LEDs indevidually. I want to be able to use the Inchworm programmer with it and make differnt flash patterns. I see that Nigel has an 8 LED board in his lessons, but it uses MCLR (RA5) as an output. From searching the forum, it dosn't look like that will work with the inchworm. Can someone verify that thinking? If RA5 needs to be left as MCLR, would I be best off skipping it and using RA6 and 7 and a B port for the remaining LED? Or would it be best to just use RA0-4 and use 3 of the B ports or does this not really matter? | |
| |
| | (permalink) |
| RA5 is input only and so can't be used to power an LED. I'd just use the bottom 4 bits of each port. Mike. | |
| |
| | (permalink) |
| Would it be okay to use RA 1, 0, 7, 6 and RB 7, 6, 5 4? That way all would be on one side of my PIC. I'm mostly concerned about controlling patterns when I have to worry about 2 seperate ports. If I want the center 2 to light together, I will have one on each port to worry about. Maybe thats no problem, but i'm new to everything PIC. But am do feel like I am learning thanks to everyone here | |
| |
| | (permalink) |
| Your only problem then would be the fact that the ICD2 uses RB6 and RB7. Mike. | |
| |
| | (permalink) |
| BTW, if you use the bottom 4 bits from each port then writing the value becomes easier. You would only set the lower pins to output by doing, Code: bsf STATUS,RP0 movlw 0xf0 movwf TRISA movwf TRISB bcf STATUS,RP0 Code: movfw LEDs movwf PORTA swapf LEDs,W movwf PORTB Mike. | |
| |
| | (permalink) |
| Shoot, forgot about that with RB 6 and 7. When you say bottom bits, what ones are you referring to? 1-4 or 0-3? Sorry if thats a dumb question | |
| |
| | (permalink) |
| It would have to be 0-3 if you want to use the swap instruction. Mike. | |
| |
| | (permalink) |
| Thank you. I will give it a try. | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| uuffff how doess this stupid ting work lol | cyprio7 | General Electronics Chat | 7 | 9th October 2005 07:56 PM |
| I am not getting ripple voltage at the output | dar2525 | General Electronics Chat | 3 | 14th July 2005 03:21 PM |
| Function Generator output driver | evandude | General Electronics Chat | 6 | 31st January 2005 08:49 PM |
| Effects | stephenpic | Micro Controllers | 6 | 19th January 2004 12:57 PM |