Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Clock

Status
Not open for further replies.
OMFG i hate this... every time i press play it breaks. Like i put a break point. I think its that BUG in MPLAB.

EDIT: I redid the project by erasing all files besides the main c file. It still does not run a all. Here is the main.c now. Can anyone figure something out please. :(

The path is "C:\RTClock\main.c" so i know its not a filename issue.
 

Attachments

  • main.c
    24.4 KB · Views: 140
Last edited:
Here are images showing it. The first image is when its reset meaning after a compile.
The second image is after i press RUN the green arrow shows where it stopped.
The third image shows after i press run again it stops at green arrow.
 

Attachments

  • 01.png
    01.png
    66.2 KB · Views: 143
  • 02.png
    02.png
    65.8 KB · Views: 133
  • 03.png
    03.png
    65.9 KB · Views: 129
Jason. The microchip tools are not bug free. But most of the bugs we can live with. Keep in mind the price is right and they do improve with each version.

Purchased tools have problems too. I recall one project where I was on a first name basis with a compiler developer. But that was better then a vendor with a don't call us attitude.

The uses forum's which exist here, at microchip, and other vendors sites are a huge advantage. They have welded users/developers together in a way that did not exist. You have to love it.

3v0
 
Heh, i never said i didnt love it :D
I do love it and the fact of the price is perfect! Its that i feel a little better when i complain(let out the bad) lol.

I got it working so far so good. I changed my breadboard for the button since that was causing a ton of glitches and false input. I also put pull down resistors on the rest of portb(RB7:RB5).

I changed my buzzer since i noticed (late) that its a 12v Buzzer to it was pulling to much i guess. I went to radio shack and bought a 1.5-3v 15mA buzzer and put 2 470 Ohm resistors as a voltage divider. Hoping that they would give me 2.5v @ 10-11mA.It works well no issue.

I changed the buzzer because when it rang the whole thing crashed. Now it buzzes fine and i even made it so you press enter to silence it. Anyway here is the full code and a schematic is coming in about 5 minutes.

I freely give my code out mainly because everyone here helps so much and i say this belongs to anyone who wishes to learn or earn. And hopefully it will help someone who need a example of something.

so enjoy!
EDIT: Be aware it is over 1000 lines of code here. Even though about 100-200 are comments and separators.
 

Attachments

  • main.c
    25.7 KB · Views: 137
Last edited:
I took a quick look at your code. You have made amazing progress in the past few months.

I like to setup the editor to uses spaces instead of tabs. That way the file retains the correct formating regardless of how the viewing app handles tabs. If you take a look at the code in notpade you will see what I am saying.

Again good work. Keep it up, the ability to code and read data sheets will be a great advantage when you go back to school. Even if you don't it is IMHO still on of the best hobbies going.

3v0
 
Thanks a lot 3v0!
Ill be sure to setup mplab correctly to retain the formatting of the code.

Here is the updated schematic... BTW i am going to try my best to go back to school. I think it will be the only way to move up in life in my own opinion.
I put the schematic and the code in 1 zip file. Its a eagle schematic and a PNG for those non eagle-ers :D
 

Attachments

  • clock.zip
    236.4 KB · Views: 116
  • RTCEasyView.png
    RTCEasyView.png
    133.9 KB · Views: 150
Last edited:
Hey 3v0 a friend just came by with a gift for me. He went to radio shack and got me:
**broken link removed**

Its cool.. but it comes with only the RFID reader, 1 card and 1 Circle thing. The Card and circle thing are 2 different tags. Now i have something new to play with lol Just in time too. Its the Serial version. Now i can use the pic with ease on it. Noticed it has a 16f627a on it.
 

Attachments

  • rf01.png
    rf01.png
    361 KB · Views: 164
  • rf02.jpg
    rf02.jpg
    45.7 KB · Views: 162
Last edited:
yeah I've known him for about 10 years now and im 24 so since i was 14. He knows i love gadgets and such.

i was calculating some stuff off the datasheet for it , and its 2400bps which is fast enough to read an ID about 25 times in 1 second which is pretty fast. thats about 1 in 40mS.

Since it has a 16F627A(SSOP) i figure i can get another and one and program it to work at higher speeds.

I would just need to study:
**broken link removed**

which is the RFID Front End IC. Ill leave that for next year lol ill play with this for now lol
 
Last edited:
its not the need for more speed really. Its more of having the ability to modify and alter other peoples work to learn how it works and how to build it and use it. I love thinking about opening something and modifying it.

Imagine if i mod it ... and it works lol

That means i would have learned how all the parts on the board work together meaning i can build one with less of a issue. I would call it a evaluation or demo board lol

There there to be modded but when you do it to something not meant to be mod and not meant to go faster you learn alot and gain experience and for me at least it would feel nice to accomplish something like that.

This thursday i will be ordering a few kits from mouser. The kits i refer to are the:
Prototyping Chemicals Photofabrication Kit
Prototyping Kits Exposure Kit

and a board or 2 extra.

The first board i will develop is this Clock. I guess i have to make the board in eagle. Which will be tuff since i have no relevant board making skills. :D
 
i was thinking about toner transfer but then remembered about needing a LASER Printer and then ironing. The start cost would be more and the time to create a board would be longer so i chose the photo way because with $100 i can get everything i need and about 4-5 boards to play with. Even tho the boards are a couple of dollars extra than a normal copper clad (i plan on presensatized boards) i think its worth the INK cost and ironing time.

Ink for my printer is only $10 for black. And i know how to refill (refills are $1 for me) $3 for color. So if toner is $80 then i can get 8 new inks or 80 refills and be set for a while.

Transparencies are cool since they can be reused.

I might have someone to help me photo but i need help designing this board. Any tips?

I feel like separating some of the components. Like power on a separate board and the buttons on a separate board and the lcd just wired to the main board. This way i can eagle it easier and then build a better case since i can rearrange the part to fit the enclosure.
 
Give it a go and see how you like it. I would be interested to know how well the process works with the MG chemical equipment.

3v0

EDIT: We have talked about laying out PCB in an older thread. There were some good post. Try searching for words like LAYOUT and ROUTE.
 
Last edited:
thanks and i will be sure to borrow a camera and record the process. Hopefully i dont make a fool of myself. Expect a video in about a 2 weeks. I will order Wednesday and since it MUST ship UPS/FEDEX ground it will take some time to come in. and then by the time i get everything setup (1 days time) i will have a video ready for all either to say "good jpb" or "haha" lol
 
Mouser is very good about getting shipment out. What I order prior to 5PM one day, I get the next via UPS ground. Call me spoiled!

EDIT:
Making boards has been done to death. I am not sure it is worth a video if you do not have anything new. Then again if it turns out to be dirt easy... that is another story. It always took me a few tries to get it to work.

Good luck.
 
Last edited:
On the flip side FedEx has pushed the delivery date on my Logic by another day. If they are correct it will take a full 7 days to travel less then 500 miles. On top of that it lost 2 days at Sparkfun because of holiday confusion. Had it left Sparkfun on time it may have hit my door prior to Christmas and the weekend following.

It is a good thing I have other stuff to do.

3v0
 
Heh i would have been upset. The same thing happened from BGMicro with me. It usually takes 2-3 days to get a item from them this one took over a week. With no notification ... i had to email them then they responded with this:
Jason,
Your package is on the way. I apologize for the delay. We are in the middle of moving, and it is not going as smoothly as we had hoped.
Thank you,
Tammie
BG Micro
tammie@bgmicro.com

Which i was like sure ok. But they should have notified me before i had to notify them. But as long as it came :D
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top