Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Serial LCD project, PC temps, room temps, Time/Date, Email notifier!

Status
Not open for further replies.

sirbow2

Newbie level 5
Joined
Aug 17, 2011
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,357
OK, so for my project,
Code:
-Serial LCD to display
     -PC Temps, room temps
           -PC Temps(CPU, GPU etc) using CoreTemp windows app, has shared library, any progrma can access temperature data. :)
           -LM35 for room temp, maybe real time outside temps later.
     -Time/Date, Email notification
           -not sure how, just Notifications=Yes/No
           -ds1307rtc
     -Later
           -Get Stats from VLC(media player on computer) title, time remaining, time elapsed, total length, volume, and status- playing/paused etc

Code:
-Using PIC
      -BS2 Boe-Bot
      OR (im not sure yet)
      -18F4520
      -I can get any PIC you guys think is best, AVR, MEGA, 18F
           -Id rather stay away from prebuilt boards like arduino-more expensive. i can make one my self just fine with only the stuff i need.

I was thinking of a 4x20 LCD(or bigger:)), have two buttons below for two separate "tabs" for the LCD, one would switch to temps, other has Time and Notifications.

Also i was gonna do a strip of blue LEDs above my keyboard that turn on when its dark. but that is easily done with a photodiode, NPN and a resistor. then i could add a force on/off switch and a dimmer :)

What programming language should i use? Pbasic, MCC18, mikrobasic/C? i have alittle experience in C++, C#, and BASIC from the BS2. Basic seems easier. ive seen Arduino code, its simple, easy, and i like it. can i use the arduino IDE and compile for any other PIC. Arduino is just a 16F with a special bootloder, just like the BS2. i know you cant use it with BS2 cause it has that tokenize stuff.

My Questions PIC18F:
Do i need a MHZ cyrstal for the PIC? im guessing yes, because of the time/date. what would be the best crystal to use? 20Mhz?

I got a RS232 cable for programing to make it into a Simple JDM programmer. the cable came from a BackupPSU, it has wires on pins:
Code:
1. Data carrier detect (DCD)
3. Transmit data (TX)
4. Data terminal ready
7. Request to send
8. Clear to send
scheme for JDM:
Code:
TXD (3) ------[4.7k]-------VPP

GND (5) --------------------VSS

DTR (4) -------[4.7k]------DATA

CTS (8) ------------------DATA

RTS (7) -------[4.7k]------CLK
the only thing the cable doesn't have is PIN 5 (Signal Ground). can that be left out?


BS2 Questions:
it is noticeably easier to write to the LCD in Basic, but i dont know, does it have enough power etc, to do the rest of the stuff i want?



Ok i guess what im asking is for some help on how to reiceve data from the computer, then display it on the LCD. and how to write a program on the Comp to get the data from shared library, and email notifications. the RTC, and the LM35 i should be able to write by my self i think. but the Email and PC temps are going to be more difficult

Thanks for the help. What do you guys think?
 

What programming language should i use? Pbasic, MCC18, mikrobasic/C? i have alittle experience in C++, C#, and BASIC from the BS2. Basic seems easier. ive seen Arduino code, its simple, easy, and i like it. can i use the arduino IDE and compile for any other PIC. Arduino is just a 16F with a special bootloder, just like the BS2. i know you cant use it with BS2 cause it has that tokenize stuff.

I am personally partial to C and would suggest Microchip's C18 or Hi-Tech's PICC18. However, you should code in the language you are most comfortable with. Most compilers are available in a lite or limited version. I would suggest giving them a try before you settle on a particular language and compiler.

As far as Arduino IDE is concerned, yes there is a PIC32 version available, however I not certain whether there is a version which supports PIC18.

chipKIT 32-bit MCU Power for the Arduino™ Community

My Questions PIC18F:
Do i need a MHZ cyrstal for the PIC? im guessing yes, because of the time/date. what would be the best crystal to use? 20Mhz?

If you are going to incorporate a RTC into your design, and you probably should, most require a 32.768kHz crystal, some versions even have internal crystals. So, no as far as the PIC18 you can use an internal RC oscillator.

BS2 Questions:
it is noticeably easier to write to the LCD in Basic, but i dont know, does it have enough power etc, to do the rest of the stuff i want?

Ok i guess what im asking is for some help on how to reiceve data from the computer, then display it on the LCD. and how to write a program on the Comp to get the data from shared library, and email notifications. the RTC, and the LM35 i should be able to write by my self i think. but the Email and PC temps are going to be more difficult

I you decide on using any of the MikroE compilers, their extensive library functions are available in all languages. Their LCD library makes implementing and using a LCD a snap as long as your design stays within the libraries parameters.

BS2 Questions:
Ok i guess what im asking is for some help on how to reiceve data from the computer, then display it on the LCD. and how to write a program on the Comp to get the data from shared library, and email notifications. the RTC, and the LM35 i should be able to write by my self i think. but the Email and PC temps are going to be more difficult

You can receive data from the PC in several ways, serial connection either wireless or hardwired, USB establishing a Virtual Serial Connection or Ethernet. The simplest would be implementing a serial connection, however if you are going to implement the Email notification, much of the Ethernet complexity will have to be dealt with already.

If you let me know which sections of the project are giving problems I can most likely provide an example or two depending on the compiler you choose.

For Example in MikroC:

A Simple Clock using DS1307 + PIC16F877A

BigDog
 

If you are going to incorporate a RTC into your design, and you probably should, most require a 32.768kHz crystal, some versions even have internal crystals. So, no as far as the PIC18 you can use an internal RC oscillator.
I am planning on using a ds1307 as a external RTC(first code box). so the ds1307 for sure needs a 32.768 crystal. what about the PIC? does it need to be on 32.768 also, or the regular 20mhz?

however if you are going to implement the Email notification, much of the Ethernet complexity will have to be dealt with already.
so i should use Ethernet and internet enable my PIC to do the email? or just Ethernet to connect to the PC and still use the PC to notify the PIC? i haven't read anything about this so ill go search around.
-if i connect Ethernet to the PIC is that going to like a router or what? can it be used to get the PC temps too? (i suppose if i read about it ill find out)

You can receive data from the PC in several ways, serial connection either wireless or hardwired,
If the email notification requires Ethernet to the PIC then i will sue that to connect to the Comp. for now im going wired serial or Ethernet, but wireless sound good for a future upgrade.
-so to connect my PIC to the PC for simple data transfer (temps etc) can i simply hook up the TX of the computer to the RX of the PIC or does it require something more?
-for wireless connections between PC and PIC, im not sure but the way you worded it, is a wireless serial connection the best way to go? IR, WIFI?

Thanks! im not very experienced in this level of PIC stuff so it helps alot!
 

I am planning on using a ds1307 as a external RTC(first code box). so the ds1307 for sure needs a 32.768 crystal. what about the PIC? does it need to be on 32.768 also, or the regular 20mhz?

No, the PIC's oscillator is independent of the RTC, you could use the internal RC oscillator or external crystal. Also, most if not all PIC18F have PLL which allows it to generate a higher frequency clock using a lower frequency crystal or RC oscillator.

so i should use Ethernet and internet enable my PIC to do the email? or just Ethernet to connect to the PC and still use the PC to notify the PIC? i haven't read anything about this so ill go search around.
-if i connect Ethernet to the PIC is that going to like a router or what? can it be used to get the PC temps too? (i suppose if i read about it ill find out)

First off, let me say implementing a TCP/IP stack for Ethernet is no small task. That being said, the use of Ethernet to access your SMTP server, (email server) to provide email notification would most likely be the most direct route. Once the Ethernet is implemented you could easily use it for other tasks such as communication with a PC. There are Ethernet modules with utilize a serial connection with the MCU and take care of all the TCP/IP dirty work. They acts some what like an intelligent modem.

Not as a router. There are several TCP/IP services which can be implemented including, HTTP, FTP, ICMP, etc. Your device could in essence be a server on your network. Communication with the PC is definitely doable and rely only on your skills at the PC end.

If the email notification requires Ethernet to the PIC then i will sue that to connect to the Comp. for now im going wired serial or Ethernet, but wireless sound good for a future upgrade.
-so to connect my PIC to the PC for simple data transfer (temps etc) can i simply hook up the TX of the computer to the RX of the PIC or does it require something more?
-for wireless connections between PC and PIC, im not sure but the way you worded it, is a wireless serial connection the best way to go? IR, WIFI?

Thanks! im not very experienced in this level of PIC stuff so it helps alot!

I not email access requires Ethernet, but is definitely the most direct route. You could write a service app for the PC which forwards information to your device via a serial connection, RS-232, USB Virtual Serial Connection, Bluetooth, etc.

WiFi, depending on the exact device may or may not require implementation of a TCP/IP Stack, some devices allow for communication via serial interface and take care of the underlying TCP/IP like the Ethernet modules I spoke of earlier.

To implement a serial interface between the MCU (PIC) and the PC requires the use of a RS-232 transceiver, like a MAXIM MAX232. YOU CAN NOT CONNECT THE SERIAL PORT OF THE PIC DIRECTLY TO THE PC. Doing so could result in your device being damaged, the PC serial port being damaged or both.

There various methods of wireless serial, including Bluetooth, ZigBee, IR, etc. The choice depends on the amount of data being transferred, size and speed requirements.

Hope the info helps you in your endeavors.

BigDog
 

ok thanks.

but another quick question, im confused on how to connect DS1307 to pic. i understand it uses I2C a battery a crystal, and the 5V. but some schemes say resistors some don't, some say resistors are already in PIC. what is it?
DS1307-Schematic.jpg


same with LM35, some have resistors on the out port, some dont.

ok so i have on more question:
Which of the C languages is the most popular, has the largets user base, code examples?
MikroC
MCC18
CCS C
HI-Tech C Pro

thanks
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top