![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| it s true that picbasic is easier than the asm,but my problem is that the other part of my project are written using asm :S | |
| |
| | (permalink) |
| For most small applications, there is no need for encoding the data. It's a fiar bit of overkill, and there are many radio modules that simply run with UART data as they encoded/decode it on the fly I take it your using Proton still? In that case, have a look at this code' TX; Code: Device = 16F628A
Symbol Key = PORTA.0 ' Define which Pin the Button is on
' Start of program;
ALL_DIGITAL = True ' Make all I/O's digital
Input Key ' Make the Key pin an input
While 1 = 1 ' Create an infinate loop
RSOut "Header", Dec Key, "Z" ' Send the current status of the key
DelayMS 100 ' Delay for 100mS
Wend ' Loop for ever RX Code: Device = 16F628A
Dim Key As Bit ' Define a register for the Key data
' Start of program...
ALL_DIGITAL = TRUE ' Make all I/O's digital
Low PORTB.1 ' Set up the IDLE state of the RSIn_Pin
While 1 = 1 ' Create an infinate loop
RSIn Wait("Header"), Key ' Wait for the text "Header", then grab the key data
If Key = 1 Then ' Check if the key was pressed or not
Print At 1, 1, "Key is Pressed" ' If it was then display this text
Else
Print At 1, 1, "Released " ' Else if it wasn't then display this text
EndIf
Wend ' Loop for ever ![]() Click here to watch this program and circuit simulated
__________________ Spency. PIC Micro's - Your mind is the limit PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net Last edited by gramo; 7th June 2007 at 02:26 AM. | |
| |
| | (permalink) |
| Hi, Since this thread is about LCD, I have one question here. Usually the Vee pin is connected to a potential meter to adjust the contrast. I found that if I supply the LCD with 3 V, the contrast is suit to me when the variable resistor is fully turned, which is ground level to Vee pin. If I connect this pin directly to ground without any current limiting resistor, is it okay? Thanks
__________________ Superman returns.. | |
| |
| | (permalink) | |
| Quote:
I usually only put on the bare minimum when simulating, and using Proteus a fair bit allows me to know a lot of the “back doors”. Makes things look a lot neater and smoother. For Vee (Contrast), connect a 4.7K to 47K potentiometer like this to it. Now you have complete control over the contrast of the LCD. Dont wire it directly to ground or 5V, as they are both opposite (full and low) limits of the contrast
__________________ Spency. PIC Micro's - Your mind is the limit PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net Last edited by gramo; 7th June 2007 at 05:10 AM. | ||
| |
| | (permalink) | |
| Quote:
http://www.winpicprog.co.uk/pic_tutorial_changes.htm It's also pretty important to encode the data via a radio link, it makes it far more reliable and prevents many problems. | ||
| |
| | (permalink) |
| >> posted by gramo. For most small applications, there is no need for encoding the data. It's a fiar bit of overkill, and there are many radio modules that simply run with UART data as they encoded/decode it on the fly I agree with this statement, I have always used the UART data radio transmission format for radio telemetry and never had any problems. 300 thru 9600 baud, upto 10K, LOS.
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Help understanding the Unicorn | Kyle-s4h | Micro Controllers | 2 | 5th June 2007 07:09 PM |
| PIC clock/4 output -- why ? | tiny2 | Micro Controllers | 8 | 8th April 2007 08:06 PM |
| Using PicBasic with Output compare for sounds | mduong77 | Micro Controllers | 7 | 29th March 2007 03:29 AM |
| PIC Project advice - doubling frequency | coze | Micro Controllers | 8 | 26th February 2007 08:05 PM |
| Newcomers, please read! (PIC regarded) Upd. 0xD | Jay.slovak | Micro Controllers | 0 | 17th April 2005 02:05 PM |