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 13:31:00 +0000

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=pA3uSUwHMllrbkCJq6Gg6Q6B2eGIqUel5OTQmPGIpbVKxl2_FTTBmHn6PX0n-W_E3JaqSmxRkMg7RByGJd_6CsF5">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
.






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.