Jump to content

Recommended Posts

I am looking for anyone who can either write, or help with snipits to construct a 60 second timer that upon button press (RB0) Turns on LED at (RD1) when timer = 0 Turns on 2nd LED at (RD3) 16F946 MCU Also there is a 4x20 HD44780 based LCD to display countdown 59 to 00. E=RG0 RS=RG2 RW=RG1 DB0-DB7 Port F 0-7 respectively. I am just learning pic micros and do not have enough knowledge myself to write the program. Any sugestions, snipits, or help would greatly be appreciated.

 

Thanks

D.

Link to post
Share on other sites
I am just learning pic micros and do not have enough knowledge myself to write the program. Any sugestions, snipits, or help would greatly be appreciated.

 

Thanks

D.

 

I suggest aquiring the knowledge!

Start with something smaller, write a program to make the LED flash on and off, then write a program to read the button and turn the LED on when the button is pressed and off when the button is released, write lots of similiar small programs, experiment.

Link to post
Share on other sites

Picxie,

 

The programmer we had hired to do all the software and programming backed out on the deal took off with $10,000.00 and left us hanging. I am an electronics engineer not a programmer I know enough to be dangerous when is comes to programming that is why I hired someone else to do it. In the spring I will acquire the knowledge and start working on minor degree but that is of no help to me right now.

Here is my delema. I have 3 weeks to demonstrate to my investors that my system works or I loose them I leave for florida oct 5th. I need a basic count down timer 60 to 0 , A switch connected to RB0 initiates the count down. When the timer reaches 0 the output signal RD3 will actually turn on a transistor that in turn activates a relay which closes a valve. the led's were just to demostrate that something was happening could care less about LCD and LEDS at this moment if I can just get a timer 60 to 0 when RB0 is pressed, when timer reaches 0 closes the valve. After I secure the investors, then I will have time to search out another programer that can handle all the programming and PC software interfaces, USB, RS-232 etc.

 

Thanks

Dan.

Link to post
Share on other sites

Dan,

 

There have been situations like this in my past as well only it has been from the programming side.

 

If I had taken $10,000 then backed out, some very unpleasant things would have happened to me including but not limited to the loss of several manipulatory members from my person.

 

While you are indeed in a most unfortunate circumstance the account of your predicament seems to lack credibility.

 

Should you be sincere in your need for assistance I can offer a sample program written using BoostC. This program can be demonstrated using the Microchip PICkit1, a PIC16F688 and an LCD 2x20 display based on the HD44780.

 

The program shows the methods used to place characters on the LCD display, sample an analog input, count seconds then display the time counted and analog voltage on the LCD.

 

If you have suitable hardware I can send you the HEX file so that you will have confidence that I have enough experience to create the code you request with your original post.

 

You may purchase the source code for this application for $20 US dollars.

 

Here is a description of how the PICkit1 is connected to the LCD display:

// File: example7.c
// target PIC16F688

#include <system.h>

/* Port pin assignments:

  The PICKit1 has a 10K pot to provide analog voltage 
  source to RA0 for the tutorial lessons. 

  RA0 - analog  input  PICKit1 analog voltage input
  RA1 - digital output not connected
  RA2 - digital output connected to RW (read/write in)	  of LCD (pin 5)
  RA3 - MCLR	input  connected to PICKit1 button
  RA4 - digital output connected to RS (register select in) of LCD (pin 4)
  RA5 - digital output connected to E  (enable strobe in)   of LCD (pin 6)
  2.2K ohm to ground   connected to Vo (contrast)		   of LCD (pin 3)


  RC0 - digital I/O connected to DB4 of LCD (pin 11)
  RC1 - digital I/O connected to DB5 of LCD (pin 12)
  RC2 - digital I/O connected to DB6 of LCD (pin 13)
  RC3 - digital I/O connected to DB7 of LCD (pin 14)
  RC4 - digital output not connected
  RC5 - digital output not connected

*/

/* LCD display module is Sharp LM20A21 

pin  1 - VSS Ground
pin  2 - VDD +5
pin  3 - Vo  Contrast (0 to 1.5V, 0=dark, 1.5V=light)
pin  4 - RS  Register select
pin  5 - RW  Read/Write select
pin  6 - E   Enable active high strobe
pin  7 - DB0 Data bit 0
pin  8 - DB0 Data bit 1
pin  9 - DB0 Data bit 2
pin 10 - DB0 Data bit 3
pin 11 - DB0 Data bit 4
pin 12 - DB0 Data bit 5
pin 13 - DB0 Data bit 6
pin 14 - DB0 Data bit 7

*/

Edited by cac001
Link to post
Share on other sites
Dan,

 

There have been situations like this in my past as well only it has been from the programming side.

 

If I had taken $10,000 then backed out, some very unpleasant things would have happened to me including but not limited to the loss of several manipulatory members from my person.

 

While you are indeed in a most unfortunate circumstance the account of your predicament seems to lack credibility.

 

Should you be sincere in your need for assistance I can offer a sample program written using BoostC. This program can be demonstrated using the Microchip PICkit1, a PIC16F688 and an LCD 2x20 display based on the HD44780.

 

The program shows the methods used to place characters on the LCD display, sample an analog input, count seconds then display the time counted and analog voltage on the LCD.

 

If you have suitable hardware I can send you the HEX file so that you will have confidence that I have enough experience to create the code you request with your original post.

 

You may purchase the source code for this application for $20 US dollars.

 

Here is a description of how the PICkit1 is connected to the LCD display:

// File: example7.c
// target PIC16F688

#include <system.h>

/* Port pin assignments:

  The PICKit1 has a 10K pot to provide analog voltage 
  source to RA0 for the tutorial lessons. 

  RA0 - analog  input  PICKit1 analog voltage input
  RA1 - digital output not connected
  RA2 - digital output connected to RW (read/write in)	  of LCD (pin 5)
  RA3 - MCLR	input  connected to PICKit1 button
  RA4 - digital output connected to RS (register select in) of LCD (pin 4)
  RA5 - digital output connected to E  (enable strobe in)   of LCD (pin 6)
  2.2K ohm to ground   connected to Vo (contrast)		   of LCD (pin 3)


  RC0 - digital I/O connected to DB4 of LCD (pin 11)
  RC1 - digital I/O connected to DB5 of LCD (pin 12)
  RC2 - digital I/O connected to DB6 of LCD (pin 13)
  RC3 - digital I/O connected to DB7 of LCD (pin 14)
  RC4 - digital output not connected
  RC5 - digital output not connected

*/

/* LCD display module is Sharp LM20A21 

pin  1 - VSS Ground
pin  2 - VDD +5
pin  3 - Vo  Contrast (0 to 1.5V, 0=dark, 1.5V=light)
pin  4 - RS  Register select
pin  5 - RW  Read/Write select
pin  6 - E   Enable active high strobe
pin  7 - DB0 Data bit 0
pin  8 - DB0 Data bit 1
pin  9 - DB0 Data bit 2
pin 10 - DB0 Data bit 3
pin 11 - DB0 Data bit 4
pin 12 - DB0 Data bit 5
pin 13 - DB0 Data bit 6
pin 14 - DB0 Data bit 7

*/

 

 

I agree with you, the situation seems improbable! Maybe they were not $USA... An electronics engineer who cannot execute a very simple program for the PIC using high-level tools? Who gives $10,000 IN ADVANCE for this! It's his school project, isn't it ;)

Link to post
Share on other sites
Picxie,

 

The programmer we had hired to do all the software and programming backed out on the deal took off with $10,000.00 and left us hanging. I am an electronics engineer not a programmer I know enough to be dangerous when is comes to programming that is why I hired someone else to do it. In the spring I will acquire the knowledge and start working on minor degree but that is of no help to me right now.

Here is my delema. I have 3 weeks to demonstrate to my investors that my system works or I loose them I leave for florida oct 5th. I need a basic count down timer 60 to 0 , A switch connected to RB0 initiates the count down. When the timer reaches 0 the output signal RD3 will actually turn on a transistor that in turn activates a relay which closes a valve. the led's were just to demostrate that something was happening could care less about LCD and LEDS at this moment if I can just get a timer 60 to 0 when RB0 is pressed, when timer reaches 0 closes the valve. After I secure the investors, then I will have time to search out another programer that can handle all the programming and PC software interfaces, USB, RS-232 etc.

 

Thanks

Dan.

 

We hope you enjoyed this story, if you would like to read more may I suggest you visit

http://forum.java.sun.com/forum.jspa?forumID=31

 

Yes folks, its that time of year again

Link to post
Share on other sites

Here the text of the actual letter sent to Jon in regards to his failure to produce the program that had been paid for with the exception of the final $2000.00. and literally nothing was recieved in return with the exception of 2 small I mean small snipits that he gave us(I am guessing since I did not know anything at all about programming this was a ruse just to basically shut us up) as he formated the hard drive of the computer we had puchased for his use to write the software so we have no record of what was done or not done. After this fiasco we consentrated our efforts on another product called Easy Cam. Which offically went to market february of this year. We picked up the waterguard project again and when our investors came to us at the end of august we have until the meeting October 5th to come up with a working prototype. At this point we had just finnished the electronics for the new system incorporating a RS-232 PC interface to control multiple units, Pressure Sensor for line integrity checks, DS1302 RTC for date time year needs. I can provide detailed schematics and photos if needed. The MCU is a PIC16F946 and the lcd is a AMC2004A I am not concerned with lcd leds or anything else at this point. So yes my needs are genuine and valid. I do not have the time to completely restructure the PCB unit around the 16F688 please see attached scan of PCB layer document patent pending.

 

 

post-3771-1189427922_thumb.jpg

The system must only do 3 things the first is when the flow switch is on causing pin RBO to go low (pin remains low) this action starts a timer at T-15,30 or 60 sec (realy does not matter on time delay) as long as when the time gets to zero RD3 will go low causeing the valve to close. The initial state of RD3 (rly1) is Output driving the transistor realy 1 circuit. When RD3 is 0 the transistor circuit is off causing the the valve to close.

PB2 resets system. (this is on pin RB3)

 

 

October 26th 2006

Jon M. Bradtmueller

 

 

Dear Jon,

We are writing you in regards to the software program you were contracted to write for us back in March of this year. After several attempts to contact you through phone, e-mail, and a visit to your house, we have been unable to contact you. I spoke to you on the phone Thursday October 19th 2006 and informed you that at 7pm that evening we had to have a progress report and demo of the program as it stands today, since we have not received one since July 28th 2006. We have received no response, we again requested that you contact us by 9am Friday the 20th and still no response. All we get when we call are answering machines, and you have yet to return a phone call.

The company provided you with a computer to use for this purpose, literature, books, and demo circuit board to work with to complete this software program at your home, in what you estimated would be completed by the 1st of September. We do understand that you ran into issues with the program and we were assured it was being worked out and you would have something solid in a week or two. This was almost 12 weeks ago and we have not received an update as to the status of the program since July 28th 2006. We have sent you several checks as agreed in the contract totaling $10,000.00 and you were only required to provide update reports and a hard copy of the software program to date as agreed to continue to receive payment. When the updates and reports stopped so did the checks. You stated at a meeting in July of 2006 that the program was at 95% completion at which point you were so instructed to provide continuous weekly updates and provide a hard copy of the 95% you had completed which still has not been provided. We received two small snippets of the program and nothing else since July 28th 2006. Therefore we have decided if you wish to continue on this project you were contracted to complete you may do so at our facility until its completion. The hours at our facility are from 7am to 3:30 pm Mon thru Fri. You will be paid through our payroll department at the rate of 500.00 per week base on 40 hours per week if you work less than 40 hours pay rate is at $12.50 per hour until the agreed amount of $12,000.00 in the contract has been reached. At that point the software program must be completed and functional for market as agreed in the contract including working out the bugs as you stated there may be. If it is not completed you will still be required to complete the software program as agreed in the contract at your expense and it will have to be completed at our facility. What ever you decide you have 72 hrs from the delivery of this notice to return the laptop, all software, books, demo circuit board and all supporting documents to the Kingsport facility or 160 Hales Rd. Further more any attempt to copy, damage, format, or otherwise deny access to data pertaining to the software package in the contract will be considered a breech of contract and legal action will be taken to recover company property, recover data, money paid, recovery fees, and legal fees.

Sincerely,

 

Daniel M Lange

General Manager

Water Guard Systems, LLC

CC, Howard Worthy, Fred Lange, Rick Joy

Link to post
Share on other sites
Here the text of the actual letter sent to Jon in regards to his failure to produce the program that had

...

Water Guard Systems, LLC

CC, Howard Worthy, Fred Lange, Rick Joy

 

Sorry Dan, thats a pretty unfortunate set of circumstances, with it being the beginning of term at so many colleges and having heard so many stories before (ranging from "dog ate homework", "sister died", "I am an eminent professor and I need to check my answers before I set these questions to my students") I tend to be a little sceptical.

 

A forum is not going to be the best place to get this resolved, forums are better suited to answering specific questions about a problem.

 

BTW I believe Dave and Pavel who wrote SourceBoost do contract work, maybe the can help!

See http://www.sourceboost.com/

Link to post
Share on other sites
I do not have the time to completely restructure the PCB unit around the 16F688 please see attached scan of PCB layer document patent pending.

Dan,

 

Sorry for any misunderstanding.

 

My intent was not to even suggest that you replace the PIC16F946 but only as a way to build confidence that I have some understanding of the issue you need addressed.

 

Should you happen to have a PICkit1 and PIC16F688 you could assemble the hardware and have proof that the I can provide the code you need.

 

It seemed to me that anyone so badly treated by contract programmers as you have been would want something more substantial the next time help was engaged.

 

I've looked at the Water Guard Systems, LLC web site here but did not see the Easy Cam product.

 

You really should get help that is located close by.

 

cac.

Link to post
Share on other sites
Ok, I can manage turning a pin on and off, but what I don't know is how to make a timer.

 

 

Read this thread by ra68qi

http://forum.sourceboost.com/index.php?showtopic=2399

 

Its available in SourceBoost support forum > PIC and SX Embedded Programming > BoostC and C2C compilers as a sticky thread

 

The first few lessons are basic led and button twiddling.

Lesson 10 deals with using a timer to generate a tick. lesson 11 expands on this to make a clock

I advise working through carefully DO NOT dive straight in to lesson 11.

 

Also consult the app notes on Microchips website. There may be one on interfacing an LCD

However note that setting up an LCD is not a trivial task.

Link to post
Share on other sites
Here the text of the actual letter sent to Jon in regards to his failure to produce the program that had

...

Water Guard Systems, LLC

CC, Howard Worthy, Fred Lange, Rick Joy

 

Sorry Dan, thats a pretty unfortunate set of circumstances, with it being the beginning of term at so many colleges and having heard so many stories before (ranging from "dog ate homework", "sister died", "I am an eminent professor and I need to check my answers before I set these questions to my students") I tend to be a little sceptical.

 

A forum is not going to be the best place to get this resolved, forums are better suited to answering specific questions about a problem.

 

BTW I believe Dave and Pavel who wrote SourceBoost do contract work, maybe the can help!

See http://www.sourceboost.com/

 

 

But not for $12.50 an hour, I imagine! For the venture's key product, at that.

 

Dan, use a spellchecker, at least on your website if not your letters. Typo's do not impress. I think this must be your first business venture. Basic advice: don't make your problems public. Those that could help will stay away, only the sharks will swim up to you. If you cannot judge the work you are paying for, you need to find someone who can. You will need to pay for that knowledge. Chase 'Jon' as you have stated you will; you have to do that. But you have confused the sanctions: he has the option of completing the work or refunding you, but you are seeking someone else to it at the same time. Just go for the money, or you might end up paying for duplicated work. Generally, though, pay upfront only when absolutely unavoidable.

 

It still sounds fishy to me, but after 30 years in business you get a suspicious mind.

 

John (not Jon!)

Link to post
Share on other sites

Dan,

Thank you all that have sent input of ideas and sources of informaiton. With a lot of hard work and a little luck I should be able to get through the demo in october.

 

Thanks Again Everyone,

 

Dan

Here is the alarm clock program I wrote a few months ago using the Novo RTOS.

It can be easily adapted to give you the functionality you want.

If you can't manage to do it I'll probably be able help. I'm sure it won't take more that an hour or two.

 

Regards

Dave

Clock.zip

Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...