Technical discussions about Freescale Microcontrollers: M68HC11. (Freescale Semiconductor is a Subsidiary of Motorola).
Output values in hc11 memory to PC - noobie_boy - Aug 14 6:28:51 2006
hi everyone,
i am looking for a way to export values in the hc11 memory to the PC.
i've done some searching and read about some way to export it using
BASIC programming.
the problem is i have no idea what and how to use BASIC programming
and the code given. so i was hoping if anyone can help me with it or
maybe suggest another method(hopefully using the hc11 assembly
language).thanks.
here's the thing i've read....(its from this site)
http://www.seattlerobotics.org/encoder/200009/qcam.html
BASIC Display Code
Here is a very simple BASIC program to run on the PC which was used to
display the 3-washer image above using ASCII characters sent directly
to it from the HC11. This is about as simple of a display program as
one can write. I've kept some lines of code which I experimented with
as comments (REM stands for remark). Notice that I expect exactly 110
characters to be sent from the HC11. Also, the HC11 sends end-of-line
characters to align the rows within the image.
This BASIC program uses channel COM1 for communication with the HC11.
It also writes the received image to a file called "qcam.txt".
CLOSE #1
CLOSE #2
CLOSE
OPEN "COM1:9600,N,8,1,cd0,cs0,ds0,op0,rs" FOR INPUT AS #1
REM open options, CD......
OPEN "qcam.txt" FOR OUTPUT AS #2
I = 0
REM WHILE (I < 24 * 78 * 3)
WHILE (I < 110)
S$ = "tpd"
INPUT #1, S$
WRITE #2, S$
REM j = 65
REM j = INP(&H3FC)
REM WRITE #2, CHR$(j)
I = I + 1
WEND
CLOSE #1
CLOSE #2

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
RE: Output values in hc11 memory to PC - Jim Peterson - Aug 14 8:39:17 2006
Try a google search for "PC BASIC Programming". the code you have
selected requires the corresponding assembler logic in the HC11 to send
the expected data. The image is whatever is in front of the camera, the
three washers is an example.
Good luck,
Jim
-----Original Message-----
From: m...@yahoogroups.com [mailto:m...@yahoogroups.com] On Behalf
Of noobie_boy
Sent: Monday, August 14, 2006 6:28 AM
To: m...@yahoogroups.com
Subject: [m68HC11] Output values in hc11 memory to PC
hi everyone,
i am looking for a way to export values in the hc11 memory to the PC.
i've done some searching and read about some way to export it using
BASIC programming.
the problem is i have no idea what and how to use BASIC programming
and the code given. so i was hoping if anyone can help me with it or
maybe suggest another method(hopefully using the hc11 assembly
language).thanks.
here's the thing i've read....(its from this site)
http://www.seattler
obotics.org/encoder/200009/qcam.html
BASIC Display Code
Here is a very simple BASIC program to run on the PC which was used to
display the 3-washer image above using ASCII characters sent directly
to it from the HC11. This is about as simple of a display program as
one can write. I've kept some lines of code which I experimented with
as comments (REM stands for remark). Notice that I expect exactly 110
characters to be sent from the HC11. Also, the HC11 sends end-of-line
characters to align the rows within the image.
This BASIC program uses channel COM1 for communication with the HC11.
It also writes the received image to a file called "qcam.txt".
CLOSE #1
CLOSE #2
CLOSE
OPEN "COM1:9600,N,8,1,cd0,cs0,ds0,op0,rs" FOR INPUT AS #1
REM open options, CD......
OPEN "qcam.txt" FOR OUTPUT AS #2
I = 0
REM WHILE (I < 24 * 78 * 3)
WHILE (I < 110)
S$ = "tpd"
INPUT #1, S$
WRITE #2, S$
REM j = 65
REM j = INP(&H3FC)
REM WRITE #2, CHR$(j)
I = I + 1
WEND
CLOSE #1
CLOSE #2
[Non-text portions of this message have been removed]

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )Re: Output values in hc11 memory to PC - Mike McCarty - Aug 14 12:38:17 2006
noobie_boy wrote:
> hi everyone,
> i am looking for a way to export values in the hc11 memory to the PC.
> i've done some searching and read about some way to export it using
> BASIC programming.
You are asking three rather unrelated questions.
(1) How do I program and use the serial port on the PC using
Linux, or something>.
(2) How do I program and use a serial port on the 'HC11?
(3) How do I design a communications protocol to effect data
transfer with
probability that
the messages arrive intact within .
> the problem is i have no idea what and how to use BASIC programming
> and the code given. so i was hoping if anyone can help me with it or
> maybe suggest another method(hopefully using the hc11 assembly
> language).thanks.
Is this really the only difficulty you are having?
Questions (1) and (3) are really not on-topic here, though there
are those who can probably help you. I've done (1) using MSDOS.
I have a less-than-fond relationship with all versions of Windows,
though some of the code I've written for MSDOS will run in
a DOS emulation window. Doing "real time" under all versions
of Windows I've encountered is something of a challenge.
What language do you want to use on the PC? Serial port programming
on the PC is also challenging, as the BIOS support is rudimentary,
and a lengthy discussion of it in PC assembler would really be
off topic.
>
> here's the thing i've read....(its from this site)
> http://www.seattlerobotics.org/encoder/200009/qcam.html
>
> BASIC Display Code
>
> Here is a very simple BASIC program to run on the PC which was used to
> display the 3-washer image above using ASCII characters sent directly
> to it from the HC11. This is about as simple of a display program as
> one can write. I've kept some lines of code which I experimented with
> as comments (REM stands for remark). Notice that I expect exactly 110
> characters to be sent from the HC11. Also, the HC11 sends end-of-line
> characters to align the rows within the image.
>
> This BASIC program uses channel COM1 for communication with the HC11.
> It also writes the received image to a file called "qcam.txt".
>
[snip code]
What specifically do you want? Instructions on how to modify
this BASIC program to do something different? Or what? The program
is pretty simple. What do you want it to do other than what it
does?
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )Re: Output values in hc11 memory to PC - noobie_boy - Aug 14 14:16:27 2006
i believe what i am looking for is how to use the code (step to use
it) so that it will do what it is supposed to do...not modify it.(i
really have no whatsoever idea about BASIC programming)
what i want to do is get a camera to capture the image and then store
it in the memory of the hc11 evaluation board. ones like microcore-11
sold at the technological arts website.
then i want to use the code(the BASIC program codes i mentioned
earlier) to output some kind of ascii characters and then save it as a
.txt file
(its exactly what the code is supposed to do)
so...pls help me...and thanks a lot.

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Re: Output values in hc11 memory to PC - Mike McCarty - Aug 14 23:34:47 2006
noobie_boy wrote:
> i believe what i am looking for is how to use the code (step to use
> it) so that it will do what it is supposed to do...not modify it.(i
> really have no whatsoever idea about BASIC programming)
>
> what i want to do is get a camera to capture the image and then store
> it in the memory of the hc11 evaluation board. ones like microcore-11
> sold at the technological arts website.
>
> then i want to use the code(the BASIC program codes i mentioned
> earlier) to output some kind of ascii characters and then save it as a
> .txt file
Ok, then you need to use whatever BASIC interpreter or compiler
you have installed on your machine. If you use a Windows type machine,
then try opening an "MSDOS Prompt" window, and typing the command
BASIC or GWBASIC, whichever works. When the interpreter starts up
(presuming it does), then try entering the program exactly as
you see it, one line at a time. When you are through, then
use the command
SAVE "MYPROG.BAS"
where you replace the characters in quotes with the name of a file
you want to save it to. To run the program, use the command
RUN
Then start your program on the '11 which needs to send 110
characters.
After that, the BASIC program should terminate. To exit the
interpreter, use the command
SYSTEM
If at a later date, you want to re-run the program, start the
interpreter, and then use the command
LOAD "MYPROG.BAS"
where the string is the name of the file you saved the program
to. You can now use the RUN command again.
Failing that, get a book on PC BASIC Programming and read it.
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )