Reply by February 26, 20082008-02-26
On Tue, 26 Feb 2008 01:39:34 -0800 (PST), dk <mcdivyakanth@gmail.com>
wrote:

>On Feb 26, 8:08&#4294967295;am, sdeyo...@hotmail.com wrote: >> On Mon, 25 Feb 2008 07:08:21 GMT, t...@nospam.com (Tom) wrote: >> >In article <83f4s39vroilvu9bmekmmbgg06smvos...@4ax.com>, sdeyo...@hotmail.com wrote: >> >>Can't get it to light a LED. I'm using MPLAB with CC5X compiler and >> >>WinPIC programmer with an RCD programmer. &#4294967295;Here's the program: >> >>Compiles and programs with WinPic ok. >> >> >> &#4294967295;void main( void) >> >>{ >> >> &#4294967295; &#4294967295; &#4294967295; &#4294967295;OSCCON= 0x7C; >> >> &#4294967295; &#4294967295;PORTB = 0x00; &#4294967295; >> >> &#4294967295; &#4294967295;TRISB = 0x00; &#4294967295;//outputs >> >> >> &#4294967295; &#4294967295; &#4294967295; &#4294967295;while (1) >> >> &#4294967295; &#4294967295; &#4294967295; &#4294967295;{ >> >> &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295; &#4294967295;PORTB=1; >> >> &#4294967295; &#4294967295; &#4294967295; &#4294967295;} >> >>} >> >> >>Here's the configure word from WinPic: >> >>Internal RC osc, WDT Disabled: 11 1111 1111 1000 >> >>Using an LED and 330 ohm from pin 7 to gnd. >> >>Any help? >> >> >You didn't say which package you are using, but if you're using the DIP >> DIP package. >> >or SOIC package, then pin 7 is RB1 but your program is setting RB0. >> >> Silly me. I'll try it again.> If you're >> >using the SSOP or QFN package then pin 7 is in fact RB0 so it should work >> >assuming no loose connections or LED connected backwards, etc. >> >> Do I do anything with MCLR? I only have Vss,Vdd and pin 7 connected.- Hide quoted text - >> >> - Show quoted text - > >What about the OSC pins ?
Nothing connecting to them. I thought the config word I used, 11 1111 1111 1000, set it up for internal osc, no? I'll try using the ext RC. Like I said, I'm a newbe to this, though I've been using a BasicStamp and a 8051 with SDCC for a compiler. I've also used a robotic controller using an 18F8722 with MPLAB 7.2, though all the setup used pre-written code.
Reply by dk February 26, 20082008-02-26
On Feb 26, 8:08=A0am, sdeyo...@hotmail.com wrote:
> On Mon, 25 Feb 2008 07:08:21 GMT, t...@nospam.com (Tom) wrote: > >In article <83f4s39vroilvu9bmekmmbgg06smvos...@4ax.com>, sdeyo...@hotmail=
.com wrote:
> >>Can't get it to light a LED. I'm using MPLAB with CC5X compiler and > >>WinPIC programmer with an RCD programmer. =A0Here's the program: > >>Compiles and programs with WinPic ok. > > >> =A0void main( void) > >>{ > >> =A0 =A0 =A0 =A0OSCCON=3D 0x7C; > >> =A0 =A0PORTB =3D 0x00; =A0 > >> =A0 =A0TRISB =3D 0x00; =A0//outputs > > >> =A0 =A0 =A0 =A0while (1) > >> =A0 =A0 =A0 =A0{ > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0PORTB=3D1; > >> =A0 =A0 =A0 =A0} > >>} > > >>Here's the configure word from WinPic: > >>Internal RC osc, WDT Disabled: 11 1111 1111 1000 > >>Using an LED and 330 ohm from pin 7 to gnd. > >>Any help? > > >You didn't say which package you are using, but if you're using the DIP > DIP package. > >or SOIC package, then pin 7 is RB1 but your program is setting RB0. > > Silly me. I'll try it again.> If you're > >using the SSOP or QFN package then pin 7 is in fact RB0 so it should work=
> >assuming no loose connections or LED connected backwards, etc. > > Do I do anything with MCLR? I only have Vss,Vdd and pin 7 connected.- Hide=
quoted text -
> > - Show quoted text -
What about the OSC pins ?
Reply by February 25, 20082008-02-25
On Mon, 25 Feb 2008 07:08:21 GMT, tom@nospam.com (Tom) wrote:

>In article <83f4s39vroilvu9bmekmmbgg06smvos14b@4ax.com>, sdeyoreo@hotmail.com wrote: >>Can't get it to light a LED. I'm using MPLAB with CC5X compiler and >>WinPIC programmer with an RCD programmer. Here's the program: >>Compiles and programs with WinPic ok. >> >> void main( void) >>{ >> OSCCON= 0x7C; >> PORTB = 0x00; >> TRISB = 0x00; //outputs >> >> while (1) >> { >> PORTB=1; >> } >>} >> >>Here's the configure word from WinPic: >>Internal RC osc, WDT Disabled: 11 1111 1111 1000 >>Using an LED and 330 ohm from pin 7 to gnd. >>Any help? > >You didn't say which package you are using, but if you're using the DIP
DIP package.
>or SOIC package, then pin 7 is RB1 but your program is setting RB0.
Silly me. I'll try it again.
> If you're >using the SSOP or QFN package then pin 7 is in fact RB0 so it should work >assuming no loose connections or LED connected backwards, etc.
Do I do anything with MCLR? I only have Vss,Vdd and pin 7 connected.
Reply by Tom February 25, 20082008-02-25
In article <83f4s39vroilvu9bmekmmbgg06smvos14b@4ax.com>, sdeyoreo@hotmail.com wrote:
>Can't get it to light a LED. I'm using MPLAB with CC5X compiler and >WinPIC programmer with an RCD programmer. Here's the program: >Compiles and programs with WinPic ok. > > void main( void) >{ > OSCCON= 0x7C; > PORTB = 0x00; > TRISB = 0x00; //outputs > > while (1) > { > PORTB=1; > } >} > >Here's the configure word from WinPic: >Internal RC osc, WDT Disabled: 11 1111 1111 1000 >Using an LED and 330 ohm from pin 7 to gnd. >Any help?
You didn't say which package you are using, but if you're using the DIP or SOIC package, then pin 7 is RB1 but your program is setting RB0. If you're using the SSOP or QFN package then pin 7 is in fact RB0 so it should work assuming no loose connections or LED connected backwards, etc.
Reply by February 25, 20082008-02-25
Can't get it to light a LED. I'm using MPLAB with CC5X compiler and
WinPIC programmer with an RCD programmer.  Here's the program: 
Compiles and programs with WinPic ok.

  void main( void)
{
	OSCCON= 0x7C;
    PORTB = 0x00;   
    TRISB = 0x00;  //outputs

	while (1)
	{
			PORTB=1;
	}
}

Here's the configure word from WinPic:
Internal RC osc, WDT Disabled: 11 1111 1111 1000 
Using an LED and 330 ohm from pin 7 to gnd.
Any help?