Mail Archives: djgpp/1997/10/08/11:03:33
>
>Nate Eldredge <eldredge AT ap DOT net> wrote:
>
>> At 05:03 10/6/1997 PDT, Alex Holden wrote:
>> >I am just starting a project in DJGPP (A PIC17C75X programmer),
which
>> >I want to be able to port to Linux at a later stage.
>To Alex: Take a look to other PIC programmers for Linux ;-)
What do you mean, are there already any free designs/software available
for programming the 17C752 and 17C756 (the latest PLCC package ones). I
didn't know there were even any commercial ones available yet apart from
Microchip's :)
>
>> It will use a
>> >colour text interface, possibly the mouse,
>To Alex: Easy solution: curses, really interesting: TVision.
>
How difficult is TVision, exactly. At the moment I am thinking of using
the console routines for DOS, and ncurses for Linux, but I have not
quite decided yet. TVision I agree is a lot prettier.
>> and will need to access the
>> >serial port directly (to communicate with the device programmer).
>To Alex: That's the more complex thing in Linux, the other is exact
timing for
>the signals.
>
>> >The problem is that I have no experience of Linux programming
>> >whatsoever, and so I need some advice on exactly what I should
do/avoid
>> >doing, to make the job of porting the program to Linux as painless
as
>> >possible.
>> If you just want to do vanilla serial port access, you can read and
write
>> the appropriate /dev/ttySx device. There are ioctl() calls to change
the
>> baud rate and stuff; see the man pages.
>No, he wants to touch all the bits by hand, no baud rate. I don't know
if ioctl
>provides it.
>
>> If you need to poke the port
>> directly, see the "Linux I/O port programming mini-HOWTO".
>That's what he want.
>
I've downloaded it (the older HOWTO I already have doesn't have that in
it), but haven't had time to look at it yet.
What I really need to do is to set up the port as (probably) 9600 bps, 8
data bits, 1 stop bit, no parity, rts/cts flow control, and to read and
write binary data through the port. If I can do this with the ioctl
function, it would probably be preferable to directly accessing the
serial port hardware. The data going through the port can be
asynchronous (the exact timing of _when_ the data goes to it is not
critical) because there will be an intelligent controller on the
programmer board.
>> > I particularly would like to know how you set up/access the
>> >serial port in Linux, and whether it's possible to do direct console
io
>> >(gotoxy(), intensevideo(), that type of thing).
>> I don't think you can, but I could be wrong. If it doesn't *have* to
be
>> interactive, you could go with the usual Unix tradition of
command-line
>> invocation with hairy options.
>He can use TVision if the target is Linux, RHIDE doesn't use command
line ;-)))
I really want to use an interactive interface of some kind. I could
possibly make it so that typing the program name without any options
puts it in interactive mode, but launching the the program with (eg.)
-Pfoobar.hex will just do program the PIC with foobar.hex, then go back
to the command line, though.
>
>SET
>------------------------------------ 0 --------------------------------
>Visit my home page: http://www.geocities.com/SiliconValley/Vista/6552/
>Salvador Eduardo Tropea (SET). (Electronics Engineer)
>Alternative e-mail: set-sot AT usa DOT net - ICQ: 2951574
>Address: Curapaligue 2124, Caseros, 3 de Febrero
>Buenos Aires, (1678), ARGENTINA
>TE: +(541) 759 0013
>
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
- Raw text -