Newbie - failed at the first hurdle on Mels RTC!


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Mar 2011
    Location
    Somerset UK
    Posts
    5


    Did you find this post helpful? Yes | No

    Default Re: Newbie - failed at the first hurdle on Mels RTC!

    Hi Joe S. - Thanks for taking the time to reply, First off here's a link to the code I'm using and the pic I'm using is a 16F1887:

    http://melabs.com/resources/samples/...ted/mn1307.txt

    I'm in work at the moment so won't be able to try anything until later, but thanks for the info

  2. #2
    Join Date
    Mar 2011
    Location
    Somerset UK
    Posts
    5


    Did you find this post helpful? Yes | No

    Talking Re: Newbie - failed at the first hurdle on Mels RTC!

    Right... I've read through the two threads you gave me the links to and thanks to you, it now compiles
    But it's not working - lol - I suspect I've wired something up incorrectly as I'm getting output on the screen, but no the time & date - just zero's!
    You've given me plenty of food for thought now, so I'll disappear back into the lab and report my findings

    Once again, thanl you for taking time out to reply - it is very apreciated.

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Newbie - failed at the first hurdle on Mels RTC!

    First off . . . You are Welcome, it is always a pleasure to help someone who appreciates it.

    IF my Fuzzy foggy memory serves me correctly, yo need some pullup resistors on those RTC data lines . . . I THINK. Since I never actually assembled that project, I am not sure.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  4. #4
    Join Date
    Mar 2011
    Location
    Somerset UK
    Posts
    5


    Did you find this post helpful? Yes | No

    Talking Re: Newbie - failed at the first hurdle on Mels RTC!

    Right - First off, cheers bud, your pointers have allowed me to get this up 'n running and working perfectly - I owe ya a pint (or two!)
    I've shelved the 16F887 and written the code to a 16F628 instead, I reckoned being a noob, it might be better to try and get my head around 'less legs' - lol and it has worked for me, I've now got a nice little RTC running on my desk and as sad as it might sound, I'm chuffed to bits with my first project.
    The next thing I want to do is write some code to output the Date & Time data to RS232 when a button is pushed, but I've run out of memory on the 16F628 as Mel's code takes up pretty much all the memory that is available! I had enough space to write the code for the button monitoring... but literally didn't have enough space for the 'serout' command line - lol
    Close, but no cigar...
    I've ordered some 16F648's to allow me to 'port' this over seemlessly (hopefully anyway!) and will post back my findings... or failures... probably failures knowing me, but I'll get there in the end

  5. #5
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Newbie - failed at the first hurdle on Mels RTC!

    Well hu lee gan, you should be chuffed (I Think !), it feels pretty good that first working code. The great thing about the 648 is it is pin compatable with the 628 and 16f84 and there is a ton of free beginners examples for those chips, without the memory shortages you alluded to. I cut teeth on that series too, though I have grown fond of the 16F690 due largely to success I have had using it on Microchips demo boards. Too many noobs want to start out with a really complicated chip and then get frustrated and stall out before learning to walk. The really great thing about the demo boards is use of ICSP and no shakey connections, though they default to intOsc, and they do sell an 18 pin demo board. What I really like is automatic reload of hex when you compile and use PICKit2. You do not have to have demo board to use ICSP, it's just really convenient.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  6. #6
    Join Date
    Mar 2011
    Location
    Somerset UK
    Posts
    5


    Did you find this post helpful? Yes | No

    Default Re: Newbie - failed at the first hurdle on Mels RTC!

    Well you're spot on - I was 'attracted' to the 16F887 due to the amount of functionality it offered ( obviously didn't research enough!), but that very same flexability was where I fell down!
    Having had problems configuring the fuses and then consequently reading the thread you sent me a link for (Mel's explanation of fuses etc.) I realised that I might be biting off more than I could chew and decided to move to the 'smaller' chip, and it worked for me. Once I have all of this working perfectly, I'm going to get it running on th 16F887 just to allow me to apply what I've learned thus far, on a new chip. The intention is to build what basically amounts to a box with an LCD displaying the current Date & Time which has a button under the LCD, when pressed, this outputs the current Date & Time via RS232... simples!
    I've got the RTC running on one 628 and the RS232 'stuff' working on another - once the 648's arrive I should hopefully be able to combine the entire code into one program (fingers crossed!)
    I haven't dabbled in electronics for many years (I'm 39 and got a C&G in digital electronics when I was 16!), and I've been meaning to play about with microcontrollers for years but never seemed to get around to it...
    I'm a 2-stroke motorbike mechanic and have quite a few bike related projects 'on the go' - hopefully I'll be able to be a positive contributer to the projects section once I get my head around PB-Pro...
    Thanks to this forum - the future smells of burning flux - lol

  7. #7
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Newbie - failed at the first hurdle on Mels RTC!

    You might try debugout or whatever keyword they use ( I am in the house away from My Computer ) anyway it is supposed to use less "overhead" so it might fit your 628.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts