Reset a 16F628A at power up

Status
Not open for further replies.
This is how i do a "ACK":

Code:
void i2c_ack(void){
    SDA_TRIS = 1;   //SDA Input
    i2c_clock();
    while(SDA);
    SDA_TRIS = 0;
}

or

Code:
void i2c_ack(void){
    SDA_TRIS = 1;   //SDA = Input
    i2c_clock();
    delay_ms(5);
    //while(SDA);
    SDA_TRIS = 0; // SDA = Output
}
 
Last edited:
the main. Not the ds1307.c
Mainly because it sets the SDA_TRIS (which you should change to the actual SDA TRIS ex: TRISC 4)

Not sure how to set it in: CSS's PIC C compiler
 
Last edited:
im downloading the demo of it now to test it out.

EDIT:
In the help file i see:

 
Last edited:
So in short, it needs no ACK routine.

So this may not be the problem after all.

/sigh

I'll keep digging
 
I remember in my I2C experience some devices give an ACK and some don't. You've got look at the timing diagrams in the device datasheet.

One trick if you have a PICkit2 you can use the LA tool to watch the I2C data go by. If you're really lucky a tool with an I2C sniffer is a real lifesaver. I had an I2C multimaster system running and a I2C sniffer allowed me to see the problems very quickly.
 
SteveyD:

Have you yet to change the power supply? What type of dc-dc you are using? A 7805? If so whats the exact model? Some only output 100mA or 250mA you might need to check that also.

Bill:
I just remembered i have 8 MAX6953's on hand and will be testing it out soon today. I also ordered **broken link removed**. They are only $1.49 each if buying less than 8.
 
Bill:
I hate when you are right lol (just kidding). Im sure i can make a few Dot Matrix displays. Its not all bad i get to code a bunch to make a pic interface with the 5x7 displays i ordered and $12 for 10 displays (2 color) you cant go wrong. Ill have fun with it. Thanks for the info.
EDIT: I just calculated it... I can build 56 Displays for $40 Thats less than a $1 each (about $0.70) . (but then factor in the actual PCB and stuff and its more lol) But still a nice project!
EDIT2: Just got a small PCB form RS(radio shack $2) and will have a 2 digit 5x7 matrixs:

ACTUAL LEDS 5x7 = 33mm(H) x 25mm(W)
2 Digit Side by Side = 53mm (25mm x 2) + 3mm space in between
whole board: 47mm(H) x 72mm(W)

SteveyD:
After working on this with you for a while ive lost track. What exactly is the issue with the project?
 
Last edited:
Still encountering the same sporatic start-up with this code.

Wondering if I might have the #Fuses incorrect

Code:
#FUSES NOWDT, XT, NOPUT, NOBROWNOUT, NOMCLR, NOLVP, NOCPD //628A

Brownout is the same as BOR, correct?
Turning it on may allow a similiar condition as POR?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…