Rolf | 1 Jul 01:06
Favicon

Re: [PIC] Strange PIC12F675 or user problem... pin cross-connect?

That's fascinating observation...

The code itself is unmodified from the 'template' as supplied by 
Microchip, so I would be surprised... but, two observations....
1. If the MOVF,w changes Z before actually moving the value, then you 
may be right, otherwise I think it is 'bulletproof'.
2. in your alternative suggestion, you have an issue with the 'restore' 
section. you use swapf to get STATUS in to W, so the nybbles will be 
swapped, so you only need one swapf to restore them in the return.

So, when exactly does the STATUS value get moved from the register to W? 
According to mid-range-manual.... well, it appears that the register 
(status) is read before the values are processed (thus re-affecting status).

Hmm. It all looks OK to me, though, using swapf may save an instruction 
in the ISR....

Rolf

Tamas Rudnai wrote:
> Hi Rolf,
>
> I believe that the context saving is not right in your code. You likely to
> overwrite Z flag, however, I can't see any section of your code that would
> use the zero flag so it might not be the case.
>
> Tamas
>
>
>
(Continue reading)

Xiaofan Chen | 1 Jul 01:28
Picon

[PIC] pk2cmd for Linux and Mac released by Microchip

Microchip has released the latest version of pk2cmd (v1.10.0) with builds for
Linux and Mac OSX.

http://www.microchip.com/pickit2

The code has been tested on Red Hat, CentOS, Ubuntu and Fedora. It partially
works on FreeBSD but there are some problems with the USB stack in FreeBSD.
If anyone knows how to work around the FreeBSD problems, or can build and
test on other non-Microsoft platforms, please let me know.

I am the main tester who did the tests for Ubuntu/Fedora and FreeBSD.

Xiaofan
--

-- 
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Xiaofan Chen | 1 Jul 01:32
Picon

Re: [EE] Fedora 9 First Impression

On Mon, Jun 30, 2008 at 11:34 PM, Herbert Graf <mailinglist4 <at> farcite.net> wrote:
> FWIW FF3 on Hardy has been pretty much rock solid for me. It has crashed
> a couple times, but the recovery facility makes crashes zero worries (if
> the browser crashes, restart it and it'll reopen all the tabs you had
> open, works extremely well).

Same experience. I am happy with FF3 under Ubuntu 8.04.

> The RCs were far less stable, but still collectively faster and more
> stable then FF2.

Agreed. I think now Ubuntu 3 is running the release version.

> Xiaofan, during an earlier discussion didn't you mention you're running
> some language related plug in?

Not on Ubuntu 8.04 and Fedora 9.

By the way, originally I wanted to post this topic as [OT] but James
mentioned that IT topics are [EE]. Next time I would probably
post IT topics (especially Windows/Linux) as [OT].

Xiaofan

--

-- 
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Olin Lathrop | 1 Jul 01:39

Re: [PIC] Strange PIC12F675 or user problem... pin cross-connect?

Rolf wrote:
> Using this 'philosophy, I would have to do a banksel before *and after*
> accessing a Bank 1 register. So, what do you choose as a banksel
> 'target' after accessing a bank 1 variable...

I wouldn't.  I don't think that philosophy makes sense.  I would set the
bank on demand as needed.

But, if you really want to abuse BANKSEL to set access to a particular bank,
you can use the first address in the bank.  That would be the bank number
times 128.

> Also, for the larger
> devices I have been using C18 with The student edition compiler, I still
> keep all the debug features, as well as the integration, etc, but would
> be completely incompatible with your toolset.

I don't care if you use my PIC development environment or not, since it's
available for free.  However, it does work with C18.  C18 uses really stupid
stack management, but I've got a assembly time switch that causes my stuff
to use the same brain dead stack management for compatibility.  I have done
several mixed MPASM/C18 projects.

> 'Doing it right' is not necessarily clrf STATUS though, is it. It will
> work fine in the ISR, but, not elsewhere.

Right, but that's where this came up.  It's one instruction that sets the
banks to a predictable state on entry to interrupt, and it works on a 4 bank
machine too.

(Continue reading)

Marc Nicholas | 1 Jul 01:40
Picon
Gravatar

Re: [PIC] pk2cmd for Linux and Mac released by Microchip

Nice! My two preferred platforms are Ubuntu and OSX ;)

I wish I could run some of my core developments tools under OSX though
- MPLAB, Swordfish, PICKit 2 programmer :(

-marc

On 6/30/08, Xiaofan Chen <xiaofanc <at> gmail.com> wrote:
> Microchip has released the latest version of pk2cmd (v1.10.0) with builds
> for
> Linux and Mac OSX.
>
> http://www.microchip.com/pickit2
>
> The code has been tested on Red Hat, CentOS, Ubuntu and Fedora. It partially
> works on FreeBSD but there are some problems with the USB stack in FreeBSD.
> If anyone knows how to work around the FreeBSD problems, or can build and
> test on other non-Microsoft platforms, please let me know.
>
> I am the main tester who did the tests for Ubuntu/Fedora and FreeBSD.
>
> Xiaofan
> --
> http://www.piclist.com PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
>

--

-- 
Sent from Gmail for mobile | mobile.google.com
(Continue reading)

Xiaofan Chen | 1 Jul 01:43
Picon

Re: [PIC] pk2cmd for Linux and Mac released by Microchip

On Tue, Jul 1, 2008 at 7:28 AM, Xiaofan Chen <xiaofanc <at> gmail.com> wrote:
> Microchip has released the latest version of pk2cmd (v1.10.0) with builds for
> Linux and Mac OSX.
>
> http://www.microchip.com/pickit2

Announcement here:
http://forum.microchip.com/tm.aspx?m=349078

Xiaofan
--

-- 
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist

Rolf | 1 Jul 01:47
Favicon

Re: [PIC] Strange PIC12F675 or user problem... pin cross-connect?

Hmmm... I see yu got your routine from the datasheet.

I guess this is a place where the datasheet and the example code differ. 
Also, disregard my second 'observation' with your example code, I mixed 
up the W and STATUS restore.

I am looking in to the code more carefully now too. I think the existing 
code works fine, but, I will use the swapf anyway because it comes from 
the datasheet which I trust more than the .asm template.

I am also going to run it through the MPSIM to see if it is ever a factor...

Rolf

Rolf wrote:
> That's fascinating observation...
>
> The code itself is unmodified from the 'template' as supplied by 
> Microchip, so I would be surprised... but, two observations....
> 1. If the MOVF,w changes Z before actually moving the value, then you 
> may be right, otherwise I think it is 'bulletproof'.
> 2. in your alternative suggestion, you have an issue with the 'restore' 
> section. you use swapf to get STATUS in to W, so the nybbles will be 
> swapped, so you only need one swapf to restore them in the return.
>
> So, when exactly does the STATUS value get moved from the register to W? 
> According to mid-range-manual.... well, it appears that the register 
> (status) is read before the values are processed (thus re-affecting status).
>
> Hmm. It all looks OK to me, though, using swapf may save an instruction 
(Continue reading)

Rolf | 1 Jul 01:59
Favicon

Re: [PIC] Strange PIC12F675 or user problem... pin cross-connect?

Just as a 'by the way', the Microchip datasheet and .asm templates  
suggest different ways of doing things, but, the following is from the 
PIC12F675 datasheet:

MOVWF W_TEMP ;copy W to temp register,
 could be in either bank
SWAPF STATUS,W ;swap status to be saved into W
BCF STATUS,RP0 ;change to bank 0 regardless of
 current bank
MOVWF STATUS_TEMP ;save status to bank 0 register
:
:(ISR)
:
SWAPF STATUS_TEMP,W;swap STATUS_TEMP register into
 W, sets bank to original state
MOVWF STATUS ;move W into STATUS register
SWAPF W_TEMP,F ;swap W_TEMP
SWAPF W_TEMP,W ;swap W_TEMP into W

It is very happy to use the bcf STATUS,RP0. I am not the only person who 
uses bcf STATUS,RP0 and the datasheet is fairly authoritative, not? Oh, 
and it does not change RP1 either! Nor does it banksel.

In my mind it makes fine sense, it has clear (or at least clearer) 
meaning of what the intent of the instruction is. the clrf STATUS could 
have all sorts of intended, and unintended consequences, especially 
since it never works (clrf STATUS will always set STATUS,Z).

Assembler appears to be somewhat like perl, TIMTOWTDI ... ;-)

(Continue reading)

Rolf | 1 Jul 02:06
Favicon

Re: [PIC] Strange PIC12F675 or user problem... pin cross-connect?

MPSIM suggests the code works when entering with either STATUS,Z set as 
1 or 0. The STATUS is correctly restored.

I'm still going to change it to match the datasheet.

Rolf

Rolf wrote:
> Hmmm... I see yu got your routine from the datasheet.
>
> I guess this is a place where the datasheet and the example code differ. 
> Also, disregard my second 'observation' with your example code, I mixed 
> up the W and STATUS restore.
>
> I am looking in to the code more carefully now too. I think the existing 
> code works fine, but, I will use the swapf anyway because it comes from 
> the datasheet which I trust more than the .asm template.
>
> I am also going to run it through the MPSIM to see if it is ever a factor...
>
> Rolf
>
> Rolf wrote:
>   
>> That's fascinating observation...
>>
>> The code itself is unmodified from the 'template' as supplied by 
>> Microchip, so I would be surprised... but, two observations....
>> 1. If the MOVF,w changes Z before actually moving the value, then you 
>> may be right, otherwise I think it is 'bulletproof'.
(Continue reading)

[PIC] Need caps across the power supply?


Tomás Ó hÉilidhe wrote:
> http://users.imagine.ie/toe/scoth3.pdf

If you look at my latest schematic, you'll see I have 100 nF caps across 
Vdd and Gnd of the 887.

Given that the 887 is the only component on my board that draws current, 
do I actually need these caps?

Also do I need a cap across the battery itself?

--

-- 
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist


Gmane