gnupic: help request for gpal &gpasm for 18F252
Subject:
Re: help request for gpal &gpasm for 18F252
From:
Craig Franklin ####@####.####
Date:
12 Dec 2004 03:10:36 +0000
Message-Id: <41BBB68E.3060805@users.sourceforge.net>
Carlo wrote:
>Hello everybody,
>
>I am a complete newcomer as far as electronics is concerned. I need to
>program pic18f252 for counting the trigger events, which happen at
>random times in the range few microseconds to hundreds of milliseconds,
>and for sending out a signal when such counter reaches a pre-specified
>level (for instance 2000). I am a Debian user and I would like to use
>gputils. I have read the manual, I liked it for its essential style,
>but, on the other hand, I am completely stuck. For instance, how to deal
>with the "input/output" in gpal (ie read my trigger event and send out
>to a pit port the output, in gpal)?
>
It is fairly rough right now. It would be even worse if Robert Kaes
hadn't been contributing to the 18xx target of gpal.
1. Use gpal from cvs. There are a couple of known bugs, but it is
better than the released stuff.
2. Manually run gp2pub to generate a public file for the processor.
3. Compile something like this:
gplink-0.12.4 alpha
Copyright (c) 1998-2004 gputils project
Listing File Generated: 12-11-2004 20:51:46
Address Value Disassembly Source
------- ----- ----------- ------
public main is
end public;
module main is
with p18f252;
procedure main is
begin
00002a 0e44 movlw 0x44 p18f252.porta = 0x44;
00002c 010f movlb 0xf
00002e 6e80 movwf 0x80, 0
000030 0012 return 0
000000 ef15 goto 0x2a end procedure;
000002 f000
end module;
>I have tried the assembly way, but
>it is an overwhelming effort for my limited skill (especially addressing
>the memory).
>
You really need to get this working on at least one example. Compilers
good for improving productivity. If you use a compiler without
understanding how the PIC works, you will be lost when things don't work.
> <>Where can I find some example of some working and complete
> Gpal code and maybe some tutorial or Brief book?I started reading the
> datasheet from Microchip, but If I keep on with this pace I will not
> meet my very close deadline.
>
Don't use gpal for any close deadline. It is an on going project for
me. Like the linker, it will take time for me to complete.
>Every suggestion is most welcome.
>
>Bye,
>
>Carlo
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ####@####.####
>For additional commands, e-mail: ####@####.####
>
>
>
>