Discussion in "Project Doubts" started by    JoshG    Feb 6, 2007.
Tue Feb 06 2007, 02:06 PM
#1
Hello,

I'm new to microcontrollers and am working on the old DS1307 project. I'm trying to run the C code on my 8051 however the software I am using is microC and this software only allows for one .c file, but as many .h files as need be. So my question is could I combine all the .c's into one and would it still run? Or am I horribly wrong?

Thanks for any advice,

JoshG
Tue Feb 06 2007, 03:28 PM
#2
Yes there is an alternative for you...
copy all the C files in the respective H files except the main C file.. eg...

copy the code from LCD.C to LCD.H and include the H file.
like that.. do for all other files except the mail clock file.. i hope you understood.
Wed Feb 07 2007, 03:41 PM
#3
Ok I think I get you I just edited all the .c files and copied their contents into their respective .h files.

I also removed from the original .c files the #include<____.h> where the line is the .h file it would have called but it is now in that file.

One question is should I delete the endif statement from the original .h file or leave it?

JoshG

PS: I included the files that I edited in a .zip file, if you get a chance could you look them over? Thanks
[/html]
Wed Feb 07 2007, 09:19 PM
#4
I checked the files everything is fine.. just.. few things
well.. i was having some free time.. so i edited the files for you. i am attaching them. dont edit them now. just add them in project and compile.
Wed Feb 07 2007, 11:04 PM
#5
Rickey you are so incredibly awesome, I'll have free time to check it Friday and I'll post the results.

Thanks so much
Wed Feb 07 2007, 11:51 PM
#6
You are welcome
Wed Feb 21 2007, 12:08 AM
#7
Sorry for the huge delay I have been busy trying to figure out where I went wrong with the C code.

I decided to at least try to see if the circuit I built was functional so I downloaded your HEX file with Micro-IDE to my Atmel AT89C51ED2 and tried to power it up. Unfortunately it seems to me that I screwed up the circuit somewhere because I'm not even displaying power on my LCD display.

Going to try and work on it some more and will get back to you later with my results.

-JoshG
Wed Feb 21 2007, 12:18 AM
#8
A quick update I was able to figure out the problem with my LCD display, the 1k resistor on pin 3 was too much for the contrast so I stuck a variable resistor and dialed into the correct resistance.

Now the bad news on my display I see only 16 black boxes on the bottom of the 2X16 display. So I have to figure out what else needs to be corrected.

More later

-JoshG
Wed Feb 21 2007, 01:00 AM
#9
Here's a picture of what the LCD is currently able to display what I am going to try and do is run the data pins to a bunch of LED’s to check to see if I'm even sending data to be written since the seconds need to be updated constantly I should see at least one pin have an output signal.

I'm going to assume if I am sending data then I crossed a wire or my LCD is not functioning. If no data then something is wrong with connections to the 8051.

More later

-JoshG

*Note: sorry about the image it's my camera on my phone



[ Edited Sun Mar 25 2007, 12:56 PM ]
Wed Feb 21 2007, 10:13 AM
#10
Well if you ask me.. the LCD is fine. but it is not getting initialized. and there is problem with the code inside the controller.
Just try putting simple LCD program to check the LCD is ok or not.. do not forget to check the controller connections. RST circuit and crystal..
will be waiting for your reply!

Get Social

Information

Powered by e107 Forum System

Conversation

Mon Apr 12 2021, 11:54 AM
Joe N
I have recently launched my own site, and I am looking to provide value for you for free, by giving away 26 professional level blog post templates (worth $297).
Mon Apr 12 2021, 09:24 AM
Aretha
Hey, I think your site might be having browser compatibility issues. When I look at your website in Ie, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, very good blog! https://onanadiete.ru/alpha-numeric-reasoning-questions-and-answers-pdf.pdf alpha numeric reasoning questions and answers pdf alpha numeric reasoning questions and answers pdf

Downloads

Comments

Mirza123
Thu Jun 25 2020, 03:46 PM
eunicelove124
Mon Jun 22 2020, 03:03 PM
cerouno
Tue Jun 16 2020, 05:10 PM
Marce
Sat Jun 13 2020, 09:43 PM
Davidthils
Thu May 21 2020, 12:44 PM
Jakeror
Thu May 21 2020, 01:28 AM
motorCar
Wed May 20 2020, 07:05 PM
Vordrync
Wed May 20 2020, 11:52 AM

Online

Guests: 104, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38215
Newest member: Mirza123