Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About dersk

  • Rank
  1. That's what I needed - a driver chip - thanks for all the suggestions, I got it to work.
  2. I'm using the PIC16F913, which has a serial output. I set up the serial port to transmit on a timer overflow interrupt. To send serial data, all I have to do is set TXREG equal to the byte I want to send, right? I've set this up with 2 different compilers, 3 different serial port readers, 3 different baud rates, and I keep getting the same results - serial data is transmitted, but it's not what I sent. In the code snippets below, I send 0x39, but what I get is 0x63 (or ASCII "c" for hyperterm). The data that I get on the serial port is consistent, but never the same as what I send
  3. So... 12 bit instructions are off the table? No plans to ever add them? I was interested in using the 16F526, but it looks like it has 12 bit instructions.
  4. Is there a compiler problem with the 16F882? I'm trying to use it, but am getting nowhere and I'm not sure if it's the programmer or the compiler. This is the code I'm using to test the chip - compiles fine, programs fine, but produces no output, all ports except Vdd are 0. #include <system.h> #pragma DATA _CONFIG, _MCLRE_OFF & _WDT_OFF & _INTOSC & _PWRTE_OFF & _LVP_OFF void main() { trisa = 0b00000000; trisb = 0b00000000; trisc = 0b00000000; porta = 0b11111111; portb = 0b11111111; portc = 0b11111111; ansel = 0b00000000; anselh = 0b00000000; while(1) { po
  5. This is a strange problem - I have an ADC interrupt that works fine when using Frc, the dedicated ADC oscillator, as long as internal oscillator frequency operates at 2, 4, or 8MHz. Below 2MHz, the program freezes, but only when using Frc. The other ADC clock sources work fine. Anyone have any ideas? Thanks!
  6. I'm having some issues with timer0 (using 16F677). I WAS trying to increase the frequency of timer0, because it wasn't Fosc/4 (internal frequency = 8MHz, no prescalar) as advertised. When I tested the output, each bit of timer0 seemed to have it's own agenda, operating at approximately these frequencies: tmr0.0: 1.8kHz tmr0.1: 1.5kHz tmr0.2: 40kHz tmr0.3: 20kHz tmr0.4: 27kHz tmr0.5: 1.8kHz tmr0.6: 1.8kHz tmr0.7: 1.8kHz I set up the code below and simulated it in SourceBoost with the HEX output set to port C, but it didn't count in any conventional manner. Anyone have any idea
  7. Anyone have a good boost converter they'd like to share? I'm trying to boost between 1.5V and 3V up to 9V. Thanks
  8. Also, do you need to disable and re-enable interrupts in the interrupt? I thought that was done automatically. Let me know if I'm wrong on that count, but my interrupts work fine without the manual disable, re-enable. Can't help on the I2C, I'm struggling on that myself.
  9. I've tried to adapt a variety of different I2C protocols, but so far none of them have worked. Is there a way to know whether I am on the right track? Usually the code halts once it hits anything with i2c in it.
  10. Has anyone mapped the i2c_driver.h to the 16F677? I'm having some trouble - I pasted below some of the code from the header. In the 16F677, there's only one SSPCON and there's no BCLIF. I've been going through and deleting references to them - is there an easier way? The references to SSPCON2 and BCLIF are numerous and I'm not sure it'll work when I'm done. Is there a way to assign them dummy values? Thanks for any help. //////////////////////////////////////////////////////////////////////////// // i2c hardwareware implementation template arguments ////////////////////
  11. I have been reading that BoostC has one interrupt - is it the same with other PIC compilers? If I were to code in ASM, would I be able to use multiple interrupts? Or is the single interrupt scheme peculiar to the PICs? Thanks.
  • Create New...