Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need help programming an electronic combinational lock on Explorer 16 Development Brd

Status
Not open for further replies.

Legris

Newbie level 6
Joined
Jun 1, 2012
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,443
Hi guys, Im a student new in the fields of programming. I was asked to program an electronic combinational lock on an explorer 16 development board. The software that im using to compile is MPLAB ICD 3. The microchip is PIC24FJ128GA. I have been going to the library, googling in the internet, but yet I dont know how to start this project. Its been 2 months and my deadline is approaching. Can anyone help me ?! Give me a sample code or anything ?!

Things that I need to do on the board;
- how to program the pushbutton
- how to program the LCD and LED
- how to program the latch
- how to program delays
- how to program the eeprom and store the memory

Please, help me !
 


Hey there,

Im from singapore, and ordering the book will take a long time just to reach here. Is there any websites that you can recommend me or you can personally help me with the codes ??
 

Im from singapore, and ordering the book will take a long time just to reach here. Is there any websites that you can recommend me or you can personally help me with the codes??

I believe there are several Asian based branches of Amazon as well as other online bookstores in your locale. Also, I would think Singapore has a sizable number of bookstores.

The text is available as an ebook, including PDF format from both an Amazon branch or Newnes/Elsevier website:




There are a few online sites which have tutorials which cover the PIC24, like the following:

**broken link removed**

Many of the basic programming concepts of the PIC16/18 families can also be applied to the PIC24, just search the forum for specific PIC related topics.


If you post your code here, I and many other members would be willing to lend assistance with your project.

Although, keep in mind you'll need to do the bulk of the work, otherwise how will you learn.

BigDog
 

This is my existing code :


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include "p24FJ128GA010.h"
// Set up configuration bits
_CONFIG1( JTAGEN_OFF & GCP_OFF & GWRP_OFF & COE_OFF & FWDTEN_OFF & ICS_PGx2)
_CONFIG2( FCKSM_CSDCMD & OSCIOFNC_ON & POSCMOD_HS & FNOSC_PRI )
void TimerInit(void);
unsigned char TimerIsOverflowEvent(void);
// Set up user-defined variables
#define INIT_COUNT 0
unsigned int counter;
int main(void)
{
    // Set up PortA IOs as digital output
    AD1PCFG = 0xffff;
    TRISA = 0x1100;
    // Set up Timer1
    TimerInit();
    // Initialize variables
    counter = INIT_COUNT;
    while (1) 
    {
        // Wait for Timer1 overflow
        if (TimerIsOverflowEvent())
        {
            counter++; //increment counter
            /*PORTA = counter;*/ //display on port LEDs
                PORTA = counter;
        }// End of if...
    }// End of while loop...
}// End of main()...
 
 
 
 
#include "p24FJ128GA010.h"
//declare functions
extern void TimerInit(void);
extern unsigned char TimerIsOverflowEvent(void);
 
 
 
 
void TimerInit(void)
{
    PR1 = 0xFFFF;
    IPC0bits.T1IP = 5;
    T1CON = 0b1000000000010000;
    IFS0bits.T1IF = 0;
}
 
 
unsigned char TimerIsOverflowEvent(void)
{
    if (IFS0bits.T1IF)
    {
        
        IFS0bits.T1IF = 0;
        TMR1 = 0;
        return(1);
    }
    return(0);
}



Can any one help me in getting the next part:

1. Attempt to modify the LED sample program to perform the following function
a) Starting from the rightmost LED among the eight and light it up.
b) After 3 seconds, the lighted up LED will be turned off and the one to the left of it will be lighted up.
c) Repeat step (b) until the leftmost LED is lighted up.
d) After 3 second, turn off the leftmost LED and repeat the cycle from step a.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top