The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

PIC Programming WAS Re: OSD AGAIN


  • Subject: PIC Programming WAS Re: OSD AGAIN
  • From: Keith Doxey
  • Date: Wed, 21 May 2003 14:01:00 +0000

Sorry, didnt spot those in there....

10000 is how long to wait for a character in milliseconds before
giving up ie 10 secs. start is the label to go to if you give up
waiting for an input.

It can be used without the timeout and label but then if there is no
input your program will wait forever.

The manual is available for download as HTML or PDF so you can read
it all and get an idea first. Go for the HTML version because its
easier to navigate.

Keith


--- In <a
href="/group/ukha_xpl/post?postID=0QJfYDT4QZfDwWJVYGo3jt8V8HA0V6F1bJuFdIvu6cBwFdpJxgU7-ZqK3tQJcnUetp8lfsbdydGzYMIyQ2vY5pg">ukha_xpl@xxxxxxx</a>,
"Frank Mc Alinden" <fmcalind@b...>
wrote:
> loop: Hserin 10000, start, [char] ' Get a char from
serial port
>
> What does the 10000 and start signify ?? My thoughts were looking
for a start character ?? I will have a closer look at this as it
doesnt "seem " too difficult to pick up ..
>
> Frank
> ----- Original Message -----
> From: Keith Doxey
> To: <a
href="/group/ukha_xpl/post?postID=0QJfYDT4QZfDwWJVYGo3jt8V8HA0V6F1bJuFdIvu6cBwFdpJxgU7-ZqK3tQJcnUetp8lfsbdydGzYMIyQ2vY5pg">ukha_xpl@xxxxxxx</a>
> Sent: Wednesday, May 21, 2003 10:31 PM
> Subject: [ukha_xpl] PIC Programming WAS Re: OSD AGAIN
>
>
> Bootloader only works on PIC that can write to their own code
space
> such as 877 452 etc. These have Hardware USART so all you need is
a
> MAX232 for level conversion.
>
> PicBasic also has functions called SERIN and SEROUT which do all
the
> bitbanging for you on non USART PIC's.
>
> If you have hardware serial ports then HSERIN and HSEROUT do it
all
> for you.
>
> This is a tiny little program but see if it makes sense....
>
> char var byte ' Storage for serial character
> LED var PORTB.0 ' alias for B.0 connected to LED
>
> start: Hserout ["Hello World", 13, 10] ' Send text
followed by
> carriage return and linefeed
>
> loop: Hserin 10000, start, [char] ' Get a char from
serial port
>
> Hserout [char] ' Send char out serial port
>
> High LED ' Turn on LED connected to PORTB.0
> Pause 500 ' Delay for 0.5 seconds
>
> Low LED ' Turn off LED connected to PORTB.0
>
>
>
> Goto loop ' Do it all over again
>
> End
>
>
> Thats all there is to it. The manual is very good and anything
you
> get stuck with we can help you out.
>
> Keith
>
>
>
>
> --- In <a
href="/group/ukha_xpl/post?postID=0QJfYDT4QZfDwWJVYGo3jt8V8HA0V6F1bJuFdIvu6cBwFdpJxgU7-ZqK3tQJcnUetp8lfsbdydGzYMIyQ2vY5pg">ukha_xpl@xxxxxxx</a>,
"Frank Mc Alinden"
<fmcalind@b...>
> wrote:
> > Yes i have been reading up on them recently and the idea of
> updating the firmware in the field is attractive...I believe some
> bootloaders use the serial port ?? which means a bit bang uart
for on
> board serial ...does yours use the serial port ?? 256 bytes
doesnt
> seem too bad what about ram ?? Unfortunelty Keith never got into
> basic programming (had a vic 20 though ) assembler only ;-
((........
> >
> > Frank
> .
>
>
> Yahoo! Groups Sponsor
>
>
>
> xPL Links: <a href="http://www.xplproject.org.uk";>http://www.xplproject.org.uk</a>
<a href="http://www.xplhal.com";>http://www.xplhal.com</a>
<a href="http://www.xpl.myby.co.uk";>http://www.xpl.myby.co.uk</a>
> To Post a Message: <a
href="/group/ukha_xpl/post?postID=0QJfYDT4QZfDwWJVYGo3jt8V8HA0V6F1bJuFdIvu6cBwFdpJxgU7-ZqK3tQJcnUetp8lfsbdydGzYMIyQ2vY5pg">ukha_xpl@xxxxxxx</a>
> To Subscribe: <a
href="/group/ukha_xpl/post?postID=fU0GCZVGaT8MGxexIB0NEV5C4G_333NeWC1Acq2XwO-DVPYhNHYh-C2ua78lht-KxErl3oAowx_jIEx0GlAobgyXXy0Q6jKdJGu0xG0">ukha_xpl-subscribe@xxxxxxx</a>
> To Unsubscribe: <a
href="/group/ukha_xpl/post?postID=VLAOjJflLT1ew9geXiHy1Cis6SI3fyUK7-F6dxCunlg0hYYcyTlgZs5UG03l-9fc5-xENJM5WNdnAVaYj6UYqCqF0OH_cNi5Y5zj9GWp">ukha_xpl-unsubscribe@xxxxxxx</a>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.






xPL Main Index | xPL Thread Index | xPL Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.