Search found 13 matches

by Phaenix
Sun Apr 15, 2012 3:23 pm
Forum: E-blocks
Topic: EB006 with PIC16F88 - won't wake up from sleep
Replies: 1
Views: 2884

Re: EB006 with PIC16F88 - won't wake up from sleep

Problem fixed as far as I can tell:


void pic_lullaby(void)
{
portb = 0xFF;
clear_bit(intcon, GIE);
set_bit(intcon, RBIE);
clear_bit(intcon, RBIF);
sleep();
nop();
clear_bit(intcon, RBIF);
clear_bit(intcon, RBIE);
set_bit(intcon, GIE);
}

If anyone is able to verify that I'm still doing ...
by Phaenix
Sun Apr 15, 2012 2:52 am
Forum: E-blocks
Topic: EB006 with PIC16F88 - won't wake up from sleep
Replies: 1
Views: 2884

EB006 with PIC16F88 - won't wake up from sleep

void go_sleep(void)
{
unsigned char oldTRISB, dummy;

portb = 0;
porta = 0;

oldTRISB = trisb;

trisb = 0xff;

clear_bit(intcon, GIE);

set_bit(intcon, RBIE);

dummy = portb;

clear_bit(intcon, RBIF);

sleep();

nop();

clear_bit(intcon, RBIF);

clear_bit(intcon, RBIE);

set_bit ...
by Phaenix
Fri Apr 13, 2012 11:52 am
Forum: E-blocks
Topic: EB006 with PIC16F88 - Keypad problem
Replies: 9
Views: 7829

Re: EB006 with PIC16F88 - Keypad problem

Ah, alright. Thanks a lot!
by Phaenix
Fri Apr 13, 2012 11:22 am
Forum: E-blocks
Topic: EB006 with PIC16F88 - Keypad problem
Replies: 9
Views: 7829

Re: EB006 with PIC16F88 - Keypad problem

Sorry to be a nuisance, but my school hasn't provided me with Flowcode and I don't think they're going to give me one of the licenses they have. Is it possible for you to give me a solution that doesn't require Flowcode headers?
by Phaenix
Fri Apr 13, 2012 10:04 am
Forum: E-blocks
Topic: EB006 with PIC16F88 - EEPROM issue.
Replies: 8
Views: 6456

Re: EB006 with PIC16F88 - EEPROM issue.

It works now, thank you!

Do you mind explaining why those 'checks' for lack of a better term are necessary? Or rather, why mine wouldn't work for more than one write every time I ran the program?
by Phaenix
Fri Apr 13, 2012 9:56 am
Forum: E-blocks
Topic: EB006 with PIC16F88 - Keypad problem
Replies: 9
Views: 7829

Re: EB006 with PIC16F88 - Keypad problem

I'm using the Matrix keypad. When I press a button, the corresponding LEDs are supposed to light up. It only does that when I press buttons 1 through 6, 7 to # don't work at all.

When I press buttons 1, 2 or 3 the LEDs lit up, but sometimes they're not the right ones, or too many lit up.

I'm sorry ...
by Phaenix
Fri Apr 13, 2012 9:01 am
Forum: E-blocks
Topic: EB006 with PIC16F88 - EEPROM issue.
Replies: 8
Views: 6456

Re: EB006 with PIC16F88 - EEPROM issue.

Does anyone know why it does that?
by Phaenix
Fri Apr 13, 2012 8:54 am
Forum: E-blocks
Topic: EB006 with PIC16F88 - Keypad problem
Replies: 9
Views: 7829

Re: EB006 with PIC16F88 - Keypad problem

Does anyone know...? :(
by Phaenix
Wed Apr 11, 2012 3:39 pm
Forum: E-blocks
Topic: EB006 with PIC16F88 - EEPROM issue.
Replies: 8
Views: 6456

Re: EB006 with PIC16F88 - EEPROM issue.

I changed it, but I think I found a different problem. When I write several things to the EEPROM using the write_eeprom function, it only writes the first... for example if I did:


write_eeprom(0, 205);
write_eeprom(1, 6);
write_eeprom(2, 16);
write_eeprom(3, 25);
etc...


only write_eeprom(0 ...
by Phaenix
Wed Apr 11, 2012 1:52 pm
Forum: E-blocks
Topic: EB006 with PIC16F88 - EEPROM issue.
Replies: 8
Views: 6456

Re: EB006 with PIC16F88 - EEPROM issue.

The problem is with the splitting up of the large number. The write_eeprom and read_eeprom functions work.
by Phaenix
Wed Apr 11, 2012 1:49 pm
Forum: E-blocks
Topic: EB006 with PIC16F88 - Keypad problem
Replies: 9
Views: 7829

Re: EB006 with PIC16F88 - Keypad problem

There are no connectors on the keypad to ground it, not like the switch board has.
by Phaenix
Tue Apr 10, 2012 8:22 pm
Forum: E-blocks
Topic: EB006 with PIC16F88 - EEPROM issue.
Replies: 8
Views: 6456

EB006 with PIC16F88 - EEPROM issue.

I'm trying to write a value to the EEPROM, received from button inputs (see my other thread about the Keypad).

For now I'm doing it with a switch board...


#include <system.h>

void setup_hardware(void)
{
trisb = 0xff;
trisa = 0xe0;

porta = 0x00;
}

void write_eeprom(unsigned char address ...
by Phaenix
Tue Apr 10, 2012 3:53 pm
Forum: E-blocks
Topic: EB006 with PIC16F88 - Keypad problem
Replies: 9
Views: 7829

EB006 with PIC16F88 - Keypad problem

I think I may just be doing it wrong, but I've been breaking my head over it for a while now... I was using this for this configuration/testing strategy: Keypad Board C & Assembly Strategy


#include <system.h>

void setup_hardware(void)
{
trisb = 0xF0;
trisa = 0xE0;
porta = 0x00;
}

void main ...