delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/08/14:48:13

Message-Id: <m0xIuzC-000S1zC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT edu DOT ar>
Organization: INTI
To: Alex Holden <bigal2000 AT hotmail DOT com>, djgpp AT delorie DOT com
Date: Wed, 8 Oct 1997 15:25:12 +0000
MIME-Version: 1.0
Subject: Re: Writing code for both DJGPP and Linux.

Alex Holden <bigal2000 AT hotmail DOT com> WROTE:

> >
> >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 :)
No, but for other models. And all work pretty similar: LPT or COM used.
There are a whole project for Linux with assembler/compiler/programmer. If I 
remmember well is for the 16C84, but you need to know how to access to the port 
and make the timing not program C84 ;-)

> >>  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.
Is hard if you never used TVision. Stones in your way:
1) Getting RHIDE sources and TVision sources AND compile it.
2) Learn a little bit about TVision way of work.
I can help you in the DOS part, and perhaps even in the Linux. I'm interested 
on PICs (I used C84, C71, C62A, C622 and others).
 
> >> 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.
The how tos aren't so deep as we want, but you can contact to the people that 
works on these documents.

> 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.
Ah!, you will use a PIC to program the PIC? like Microchip does? 
I preffer the LPT approach where the PC does ALL, so changing one soft you can 
program a new PIC.

> >> > 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.
You can do it with TV.

Greetings, 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019