Jump to content

qwerty860

EstablishedMember
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

0 Neutral

About qwerty860

  • Rank
    Newbrie
  1. Hello, I have 2 minor annoyances with the sourceboost IDE. First, the form to set the Target is a pain. Perhaps make the combo box extend longer? There just seems like there should be a better way to select them, instead of scrolling through all of the possible options and finally finding the one you need. Luckily, you can type it in and it will usually find it. The other annoyance may just be something I don't have turned on, but I would like forward/backward buttons. For example, if I am working on code and see a variable and want to know where it is declared/what it is/etc I can right click and goto view definition. Once I find out what it is I would like to quickly return to where I am. Am I just missing how to do this? Thanks!
  2. Thanks Dave, I think that will be helpful to newcomers to the board.
  3. Here is my most recent code. It is changed somewhat from above, most notable I've switched to a 20 MHz clock, my master is "fast i2c" so it runs at 400 KHz. I also changed some of the ordering of the initialization from some one else's suggestions. Still, no luck. Thanks in advance! #include <system.h> #pragma CLOCK_FREQ 20000000 #pragma DATA 0x2007, 0b0001111100000010 // 0b00* * = 0 for code protect volatile bit led1 @ PORTB.3; void init_i2c_slave(); void interrupt(); void main() { //*********************// // configure I/O ports // //*********************// portb = 00000000b; trisb = 11110111b; //0 = Output, 1 = Input porta = 00000000b; trisa = 11111111b; //0 = Output, 1 = Input osccon = 01110000b; cmcon = 00000111b; //comparators off ansel = 00000001b; //AN0 on (RA0) init_i2c_slave(); led1 = 1; while(1) nop(); } void interrupt() { led1 = 0; } void init_i2c_slave() { trisb.1 = 1; //SDA trisb.4 = 1; //SCL sspcon = 0x36; sspadd = 0x50; sspstat = 0; pie1.3 = 1; //sspie pir1.3 = 0; //sspif pie1 = 1; intcon.6 = 1; //PEIE intcon.7 = 1; //Global Interrupt Enable }
  4. So you have a big problem with people doing 9 "worth-while" (who decides that?) postings, then all of a sudden becoming a spammer? Seriously though, that is too high. If someone is going to become a spammer they won't waste the time to make 2 "worth-while" posts.
  5. When is a member considered "established"?
  6. Hello, I like SourceBoost, but your support forums are ridiculous. It is ridiculous to have to wait for approval of a moderator before our post can be seen. SPAM filters are out there that work very good. Sites much more popular than SourceBoost have them and they work fine. Please fix this critical issue. When people want help, they want it fast. They don't want to wait half a day to get their post posted, and another half a day after someone replies to see the answer. If nothing else, atleast let the regular forum members posts go through instantly. Thanks.
  7. Hi Chris, Thanks for your suggestions. I made the changes to the code you suggested and I am still having no luck. (I was using pull-ups the first time). Any other ideas? Thanks again
  8. Hello, I am trying to use my PIC16F88 as a slave i2c device. I am using BoostC. I have a status led that starts out on, and as soon as an interrupt is detected it will turn off. When I connect the PIC to the master I2C, the led never turns off. I'm sure the master is working correctly and the address is correct. Any ideas? My code is as follows: #include <system.h> #pragma CLOCK_FREQ 8000000 #pragma DATA 0x2007, 0b0001111100010000 volatile bit led1 @ PORTB.3; void init_i2c_slave(); void interrupt(); void main() { //*********************// // configure I/O ports // //*********************// portb = 00000000b; trisb = 11110111b; //0 = Output, 1 = Input porta = 00000000b; trisa = 11111111b; //0 = Output, 1 = Input osccon = 01110000b; //internal oscillator @ 8MHz cmcon = 00000111b; //comparators off ansel = 00000001b; //AN0 on (RA0) init_i2c_slave(); led1 = 1; while(1); } void interrupt() { led1 = 0; if (sspstat&0x04) { //I2C Slave Transmission sspbuf=0; sspcon.4 = 1;// CKP, SSPBUFF must be write before pir1.3 = 0;//reset the interrupt flag } else { //I2C Slave Reception pir1.3 = 0;//reset the interrupt flag } } void init_i2c_slave() { //SSPSTAT sspstat.7 = 0; // this bit must be maintained clear sspstat.6 = 0;// this bit must be maintained clear //SCL and SDA as input trisb.1 = 1; //SDA trisb.4 = 1; //SCL //SSPCON sspcon.7 = 0;// WCOL Write Collision Detect bit sspcon.6 = 0;// SSPOV Receive Overflow Indicator bit sspcon.5 = 1;// Synchronous Serial Port Enable sspcon.4 = 1;// CKP sspcon.3 = 0;//0110: I2C slave mode: 7 bits address sspcon.2 = 1; sspcon.1 = 1; sspcon.0 = 0; sspadd=0x86; //SSP IE pie1.3 = 1; pir1.3 = 0; //Interrupt Control intcon.7=1; //enable global interrupt intcon.6=1; //enable global interrupt } Thanks, qwerty860
×
×
  • Create New...