Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 7th June 2007, 12:49 AM   (permalink)
Default

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
pouchito is offline  
Old 7th June 2007, 02:24 AM   (permalink)
Default

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
Attached Images
File Type: png UART and button example.PNG (14.9 KB, 32 views)
__________________
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.
gramo is offline  
Old 7th June 2007, 04:39 AM   (permalink)
Default

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..
bananasiong is offline  
Old 7th June 2007, 05:07 AM   (permalink)
Default

Quote:
Originally Posted by bananasiong
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

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.
gramo is offline  
Old 7th June 2007, 09:21 AM   (permalink)
Default

Quote:
Originally Posted by pouchito
no, because i don't know how to do it :S
Either read the datasheet (which tells you how), or check my tutorials which have a page telling you how to change from the 16F628 to the 16F877/6

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.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 7th June 2007, 09:44 AM   (permalink)
Default

>> 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/
ericgibbs is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
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



All times are GMT. The time now is 09:53 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker