gnupic: PIC16F628 and thanks
Subject:
Re: PIC16F628 and thanks
From:
John Sheahan ####@####.####
Date:
17 Aug 2002 11:19:46 -0000
Message-Id: <20020817210459.A7062@wattle.taudelta.com.au>
If you are using low voltage programming, then rb4 is a dedicated
input. Is the 'el cheapo' in that category?
john
On Sat, Aug 17, 2002 at 04:38:13AM -0400, ####@####.#### wrote:
>
> hello everyone --
>
> thank you a bundle to everyone who offered support and pointers on
> starting PIC programming. I have since bought a bunch of components and
> picked up both the first Benson book and the Myke Predko book, and I'm
> using the famed El Cheapo to program the PIC16F628.
>
> I chose this chip because my ultimate goal is to build MIDI controllers,
> beginning with a simple footpedal. The 628's built-in UART should make
> this pretty smooth, but i still have a ways to go.
>
> My current problem is that I can't seem to get RB4 on the 628 to control
> an LED. I presently have 8 LEDs on my breadboard hooked up through 1K
> resistors to the ground, and using the internal oscillator. I'm just
> trying to get it to count in binary, but the 5th LED never turns on. It's
> not an electrical problem -- if you pull the resistor or the LED the
> circuit goes nuts, counting like mad.
>
> does anyone have experience with this particular model and can offer some
> insight? here is my present code:
>
> ---
> list p=16F628
> radix hex
> #INCLUDE "p16f628.inc"
> __CONFIG _INTRC_OSC_NOCLKOUT
>
> org 0x000
>
> start CLRW ; clear my working register
> movlw b'00000111' ; disable comparators
> movwf CMCON
> clrf PORTB ; Init output latches for port B to 0
>
> movlw B'00000000'
> tris PORTB ; Set all of PORT B to outputs
> MOVLW B'11111111' ; Set A as inputs
> tris PORTA
>
> movlw B'00000000'
> loop addlw B'00000001' ; add 1 to the work register
> movwf PORTB ; move W to port B
> sleep ; wait a bit. don't care how much yet.
> goto loop ; lather, rinse... repeat
>
> end
> ---
>
> also: how can i do C programming for the PIC? i've downloaded and
> compiled sdcc, but i can't find any docs on PIC compiling.
>
> BTW: Scott, gpasm compiles perfectly out of the tarball on Mac OS X (with
> the developer's kit of course). if i can be of assistance with checking
> OS X compatibility, please let me know.
>
>
> -matt
>
>
> --
> Matthew McCabe ####@####.####
> Project Manager, Escapement Arts & Media
> http://www.escapement.net/
>
> office: 804-440-7556 mobile: 804-400-0515
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####