gnupic: PIC18F47J53


Previous by date: 12 Aug 2013 17:53:43 -0000 Re: PIC18F47J53, Bob Jacobsen
Next by date: 12 Aug 2013 17:53:43 -0000 Re: PIC18F47J53, Marko Kohtala
Previous in thread: 12 Aug 2013 17:53:43 -0000 Re: PIC18F47J53, Bob Jacobsen
Next in thread: 12 Aug 2013 17:53:43 -0000 Re: PIC18F47J53, Marko Kohtala

Subject: Re: PIC18F47J53
From: Luis de Arquer ####@####.####
Date: 12 Aug 2013 17:53:43 -0000
Message-Id: <CAD_DGv=j-VA8Rw2w1FK6bM_=uyDXpNxpn_dqBjbEn=OHybpapg@mail.gmail.com>

Hi Bob,

Thanks for the info, since that was something I didn't know anyway.

As you say, that may not be the problem after all. The 'sleep_a_while'
function that is called in between is defined as (in C code)

void sleep_a_while(byte c)
{
  byte i,j;

  for(i=0; i<200; i++)
    for(j=0; j<c; j++) ;
}

so surely it has enough time to settle.

I have seen some examples around using lots of config words for the
PIC, while I am only using these:

    CONFIG    OSC=INTOSC,WDTEN=OFF

I have read all of the other config words and thought I don't need any
more, but maybe I am missing shtg?

Regards,

Luis

Luis

On Mon, Aug 12, 2013 at 6:27 PM, Bob Jacobsen ####@####.#### wrote:
>
> On Aug 12, 2013, at 9:58 AM, Luis de Arquer ####@####.#### wrote:
>
>>
>> I have tried a simple program blinking an LED. It does work, if I use
>> the instructions
>>
>> PORTB &= 0x08
>> PORTB |= 0x08
>>
>> for toggling the LED (see asm translation below).
>> However if I use
>>
>> PORTB ^= 0x08
>>
>> which translates to a BTG (bit toggle) instruction, it won't blink at
>> all -it will light the LED up though, but no blinking can be seen even
>> with the oscilloscope.
>
>
> Perhaps some hints here:
>
> http://www.xargs.com/pic/c-faq.html#rmw
>
> but that doesn't seem to fit your timing.
>
> Bob
> --
> Bob Jacobsen, LBNL Physics Division
> ####@####.#### +1-510-486-7355 AIM, Skype JacobsenRG
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
>

Previous by date: 12 Aug 2013 17:53:43 -0000 Re: PIC18F47J53, Bob Jacobsen
Next by date: 12 Aug 2013 17:53:43 -0000 Re: PIC18F47J53, Marko Kohtala
Previous in thread: 12 Aug 2013 17:53:43 -0000 Re: PIC18F47J53, Bob Jacobsen
Next in thread: 12 Aug 2013 17:53:43 -0000 Re: PIC18F47J53, Marko Kohtala


Powered by ezmlm-browse 0.20.