| Swordfish Tutorial - PICKit 2 and UART |
|
|
| Saturday, 04 April 2009 08:58 | |
|
Communication between you PIC micro and PC could not be easier then with your PICKit 2. Forget the hassles of wiring up your DB9 connectors and worrying about MAX232's or DS275's. don't even worry about connecting an LCD to get real time data from your program... This is the fast, effective and simple solution for real time debugging and user interfacing on your projects.
Your now set to go! One other thing before I cover a simple UART program, the "Echo On" option box enable/disables the transmitted data to be appended to the UART Tool screen, eg, if you typed "Hello World" and then clicked "Send", if enabled it would display in the UART Tool screen.
Device = 18F4550 Clock = 8 Config FOSC = INTOSCIO_EC // import usart module... Include "usart.bas" // setup the internal OSC for 8Mhz OSCCON = %01110110 // read in characters and echo to screen... USART.SetBaudrate(br9600) While true USART.WriteByte(USART.ReadByte) Wend
I am using an 18F4550 as it is my PIC of choice at the moment, and also utilising the built in 8Mhz oscillator to minimise external components. You can use any PIC micro that Swordfish supports, there are plenty of other examples with setting up other PIC's on the site.
|
|
| Last Updated ( Saturday, 18 April 2009 07:36 ) |
Whos Online
- theoptimist
- Jon Chandler
Forum Activity
DROID! Just got it - hop Monday, 08 February 2010 14:07 [4 replies]
Math - mast Monday, 08 February 2010 03:21 [4 replies]
win 98 / swordfish - Graham Saturday, 06 February 2010 17:34 [1 reply]
iHID - rickeybell Friday, 05 February 2010 15:28 [4 replies]
Problem in ON INDEX GOTOL - Roshan Thursday, 04 February 2010 07:58 [3 replies]
not familar with uart or ? - Jon Chandler Thursday, 04 February 2010 04:25 [5 replies]
Will this fry my CPU? - Graham Thursday, 04 February 2010 03:40 [16 replies]









Thanks for going to the trouble of creating this tutorial...
Cheers Jon, sounds like a good rapid way to calibrate the...
Thanks Jon, should be working now - had some issues with ...
The video link appears to be broken by the way.
Nice work Graham! Love using a pot as the user interface...
The devices in the schematic above are actually user desi...
hello everyone,i am using a tlp 434 & rlp 434 rf module t...
I've been working on a better way to calibrate the servo ...