+ Reply to Thread
Page 2 of 2
First 1 2
Results 16 to 20 of 20

Thread: LED sequence program

  1. #16
    Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent
    Join Date
    Mar 2005
    Location
    Brisbane Australia
    Posts
    6,815

    Default

    The best place to get the configuration string is in the template files. They're located in C:\Program Files\Microchip\MPASM Suite\Template\Code. The one for the 12F683 is called 12F683temp.asm and contains the following line,

    Code:
    	__CONFIG   _FCMEN_ON & _IESO_OFF & _CP_OFF & _CPD_OFF & _BOD_OFF & _MCLRE_ON & _WDT_OFF & _PWRTE_ON & _INTRC_OSC_NOCLKOUT
    
    As I said earlier, the template files are a really good starting point for any project. They even contain the errorlevel -302 as standard!

    Mike.


  2. #17
    Ambient Newbie
    Join Date
    Jul 2006
    Location
    Massachusetts, USA
    Posts
    376

    Default

    Thanks guys. I did take care of the CONFIG register in my code manually, but I will change that over to the __CONFIG commands since it is what you all recommend. I just did not like the idea of not seeing what every bit was in the program.

    I did use a filter cap in my design, as I am pretty familiar with hardware. Here is my final schematic:


  3. #18
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,796

    Default

    Seems a little overcomplicated?, there seems no reason to have the comparators - just use NPN transistors and switch the -ve side of the LED's.
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  4. #19
    Ambient Newbie
    Join Date
    Jul 2006
    Location
    Massachusetts, USA
    Posts
    376

    Default

    Damn, I over-engineered it again. I had that thought in the back of my head but I just kept designing it like that. I forgot I do not need to get a 0-12V swing on the base.

    Thanks, that made the pcb less crowded.

  5. #20
    Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent Mike, K8LH Excellent
    Join Date
    Jan 2005
    Location
    Michigan, USA
    Posts
    2,522

    Default

    Rube Goldberg would probably appreciate the design (grin).

+ Reply to Thread
Page 2 of 2
First 1 2

Similar Threads

  1. Led Sequence Flashing.
    By latinlaze in forum Electronic Projects Design/Ideas/Reviews
    Replies: 2
    Latest: 16th May 2007, 02:42 AM
  2. Accessing EEPROM
    By Clayton in forum Micro Controllers
    Replies: 15
    Latest: 23rd March 2007, 03:00 AM
  3. First Program in assembly, And Programmer Inchworm.
    By Ayne in forum Micro Controllers
    Replies: 10
    Latest: 9th March 2007, 07:27 PM
  4. LED display segment flashing sequence
    By john1 in forum Electronic Projects Design/Ideas/Reviews
    Replies: 6
    Latest: 30th January 2007, 02:07 AM
  5. PicBasic Keypad program
    By Sora in forum Micro Controllers
    Replies: 0
    Latest: 20th April 2004, 07:02 PM

Tags for this Thread