Technical discussions about Freescale Microcontrollers: M68HC11. (Freescale Semiconductor is a Subsidiary of Motorola).
Random Numbers and Keyboards - Mike McCarty - Apr 28 8:43:00 2005
Yew Alex,
How is your project coming along?
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
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: Random Numbers and Keyboards - yew alex - May 2 7:39:00 2005
Hie maike,
Hows thing going on? Well my stuff on Port E seems to be working, just having problem
with the random number stuff. Even I look else where, yet, I cant find any stuff regarding
the random number. I found a few examples on Port E from freescale. Hopefully it will gain
me more knowledge.
Thanks again mike for soo supporting. Really grateful.
Kind regards,
alex yew
Mike McCarty <Mike.McCarty@Mike...> wrote:
Yew Alex,
How is your project coming along?
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
I speak only for myself, and I am unanimous in that!
---------------------------------
Yahoo! Groups Links
To
__________________________________________________
">http://mail.yahoo.com
[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: Random Numbers and Keyboards - Jim Dodd - May 2 8:41:00 2005
--- yew alex <kl_mistress@kl_m...> wrote:
> Well my stuff on Port E seems to be working, just having
> problem with the random number stuff. Even I look else where,
> yet, I cant find any stuff regarding the random number.
Here is a link at Amazon for a book I have used through the years
when I need help on software areas I know little about.
http://tinyurl.com/aupvg
It is "Algorithms in C" by Robert Sedgewick. It has a chapter on
random numbers.
Another good book (much more information but sometimes it's
TOO much information) is "Numerical Recipes in C" by Press,
Flanery, Teukolsky and Vetterling. Here is the link at Amazon.
http://tinyurl.com/b5p7w
It has a full chapter on random number generators. And while
I'm on the subject, here is another great algorithms book - but
this one doesn't have a section on random numbers. It is
very well written and has great sections on CRC, compression,
searching etc. It is easier to understand than the other two
books. It is called "Practical Algorithms for Programmers" by
Binstock and Rex. Here is the URL at Amazon.
http://tinyurl.com/c3p9v
Good luck,
Jim Dodd
Onset Computer Corp.
__________________________________________________
">http://mail.yahoo.com

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Random Numbers and Keyboards - Mike McCarty - May 2 10:33:00 2005
yew alex wrote:
>Hie maike,
>
>Hows thing going on? Well my stuff on Port E seems to be working, just having problem
with the random number stuff. Even I look else where, yet, I cant find any stuff regarding
the random number. I found a few examples on Port E from freescale. Hopefully it will gain
me more knowledge.
>
Ok, so you were able to get the A/D fired up and going. I gave you some
sample code which would do something similar to what you said, but
that wasn't enough, I guess. How about this: You post your requirements
(something like "Every time I sense a keypress, I must generate a 16 bit
unsigned integer"), a little something about your design (like "When the
key is pressed, bit 2 of PORTE is taken low), and something of your code
(like a piece of it). Then describe what you think the code does or does
not, which violates your requirements.
For short sequences, and very crude numbers, very simple linear congruential
code works just fine. But the uC doesn't have a 16x16 gives 32 multiply. But
this is likely to be what you'll find in things like "Numerical
Recipes". An
easier technique on small machines is the feedback register technique.
>Thanks again mike for soo supporting. Really grateful.
Very welcome. Looking forward to helping you get your code into order.
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
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: Random Numbers and Keyboards - yew alex - May 3 0:31:00 2005
Hie Jim,
Thanks for the info. I will look through on the website you gave me. Thank you
Hopefully the page got the things i wanted.
Kind regards,
alex
Jim Dodd <bcbuilderboy@bcbu...> wrote:
--- yew alex <kl_mistress@kl_m...> wrote:
> Well my stuff on Port E seems to be working, just having
> problem with the random number stuff. Even I look else where,
> yet, I cant find any stuff regarding the random number.
Here is a link at Amazon for a book I have used through the years
when I need help on software areas I know little about.
http://tinyurl.com/aupvg
It is "Algorithms in C" by Robert Sedgewick. It has a chapter on
random numbers.
Another good book (much more information but sometimes it's
TOO much information) is "Numerical Recipes in C" by Press,
Flanery, Teukolsky and Vetterling. Here is the link at Amazon.
http://tinyurl.com/b5p7w
It has a full chapter on random number generators. And while
I'm on the subject, here is another great algorithms book - but
this one doesn't have a section on random numbers. It is
very well written and has great sections on CRC, compression,
searching etc. It is easier to understand than the other two
books. It is called "Practical Algorithms for Programmers" by
Binstock and Rex. Here is the URL at Amazon.
http://tinyurl.com/c3p9v
Good luck,
Jim Dodd
Onset Computer Corp.
__________________________________________________
">http://mail.yahoo.com
---------------------------------
Yahoo! Groups Links
To
__________________________________________________
">http://mail.yahoo.com
[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: Random Numbers and Keyboards - yew alex - May 3 0:33:00 2005
Hie Mike,
Thanx for the advice and help, I will send my program code to you, I guess today.
Hopefully u can help.
Thank you
KInd regards,
alex
Mike McCarty <Mike.McCarty@Mike...> wrote:
yew alex wrote:
>Hie maike,
>
>Hows thing going on? Well my stuff on Port E seems to be working, just having problem
with the random number stuff. Even I look else where, yet, I cant find any stuff regarding
the random number. I found a few examples on Port E from freescale. Hopefully it will gain
me more knowledge.
>
Ok, so you were able to get the A/D fired up and going. I gave you some
sample code which would do something similar to what you said, but
that wasn't enough, I guess. How about this: You post your requirements
(something like "Every time I sense a keypress, I must generate a 16 bit
unsigned integer"), a little something about your design (like "When the
key is pressed, bit 2 of PORTE is taken low), and something of your code
(like a piece of it). Then describe what you think the code does or does
not, which violates your requirements.
For short sequences, and very crude numbers, very simple linear congruential
code works just fine. But the uC doesn't have a 16x16 gives 32 multiply. But
this is likely to be what you'll find in things like "Numerical
Recipes". An
easier technique on small machines is the feedback register technique.
>Thanks again mike for soo supporting. Really grateful.
Very welcome. Looking forward to helping you get your code into order.
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
I speak only for myself, and I am unanimous in that!
---------------------------------
Yahoo! Groups Links
To
---------------------------------

(You need to be a member of hc11 -- send a blank email to hc11-subscribe@yahoogroups.com )
Re: Random Numbers and Keyboards - Mike McCarty - May 3 9:29:00 2005
yew alex wrote:
>Hie Mike,
>
>Thanx for the advice and help, I will send my program code to you, I guess today.
Hopefully u can help.
>
>Thank you
>
>KInd regards,
>
>alex
If you post it to this group, then you'll get more help, I think.
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
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 )