Thanks for everyone's input.
The main issue was Louie's point, the ADXL345 is a QFN part and I had a bad solder joint.
From the ADXL345 data sheet, the read/write addresses are given as $A6 and...
Type: Posts; User: Terry; Keyword(s):
Thanks for everyone's input.
The main issue was Louie's point, the ADXL345 is a QFN part and I had a bad solder joint.
From the ADXL345 data sheet, the read/write addresses are given as $A6 and...
Hi,
I am currently very unsuccessful at communicating via I2C to an ADXL345 Accelerometer. The code and circuit appear to both very simple, but the response I get back makes no sense. Here are...
Quick question, how do I post code within the window on the forum, I have looked on the the site, but I can't find it, I am sure it is very simple to do.
Thanks,
Terry
Many Thanks Darrel,
For your help now and for a GREAT easy to use approach for interrupts using PBP.
Terry
Darrel,
In my PBP code the only assembly routine would be your code for the interrupt and I have no branch routines. My interrupt routine is in PBP, not assembly, but if is was, could this then be a...
Darrel,
Quick question, off topic from the most recent posts. I am using a PIC16F876A part with the DT_INTS-14.bas and using a timer0 interrupt, everything works wonderful, many many thanks! but...
Don,
I have been experimenting with both the prescaler (divide by 16) and skipping it. When I use an Agilent frequency generator for testing, the count only jitters by 1 count with either approach,...
Bruce,
You nailed the problem with the prescaler, set it and don't change it half ways through. A simple code change and it all now works great! My next step is to try your 2nd code example using...
Bruce,
Thanks for the info on the 18F2431, I just order some today, I like the idea of having less code. My application is where I have a device that puts out two frequencies, and I need to know...
Bruce,
Thanks for the link, I just found it a shortly before you posted your message, I also found a few more of your posts with code for using the capture mode with Timer1, once I realized I needed...
skimask your last description is exactly what I am trying to do. My code essentially does just that over a 200 cycle period but not very gracefully as written, the start and stop of Timer1 I don't...
Thanks for the suggestions, but at the moment I think I am getting quite a bit more resolution since essentially my time increment is 1/5MHz or 200nsec and then this is applied over a longer period...
I am using a PIC to make a very accurate (sub hertz) frequency measurement of a 4 kHz signal in as little time as possible, about ~ 100msec. I am using TIMER1 to measure the period of 400 cycles of...
Paul,
In one of you earlier posts on this thread, you mention that you use a 20ppm crystal, can you share your source for this crystal. All the crystals I have found have a 50ppm tolerance at 25 deg...
Wow Bruce!!!
What a great explanation, can this same phenomenon also happen on other ports, or is this just more unique to port A, being the typical Analog A/D port where the input capacitances are...
Dave,
I appreciate the help, I usually spend more time reading the PIC data sheets that I do writing the actual code, there always seems to be gotcha's if the registers are not set right.
Terry
Thanks for the feedback.
I added the line
CMCON = %00000111 to make port A digital rather than a comparator input, this made no difference. the default state according to the data sheet at POR is...
I have a strange problem when setting a pin high on a PIC18F2525 on the A port. Below is the code simplified to almost nothing, but demonstrates the problem. PortA.3 will not go high to 5v, it stays...
Steve,
I really like using PICMuiltiCalc it is a real time saver from having to grab the data sheet to look things up, I routinely use it for the A/D settings and the UART, very useful piece of...
Thanks for the ideas, it seems like PBP really needs some string capability where then the "case" statement could be used which I think would then be a natural for this type of application.
Terry
I have a device that is completely controlled via RS-232. The commands to make the PIC do something, like read ADC, change levels of output pins, read SPI devices, etc. is all controlled by 3 letter...
Paul,
Clever code, if the crystal oscillator is running at 20 MHz instead of 4 MHz, how would the code be modified, thanks.
Terry
Minimum 2 bytes, since that is what I am use to with the PIC hardware UART, more is always better.
Terry
I have a project where I need two UARTs operating simultaneously, so I need hardware UARTS with buffers. Since almost all the PIC chips only have one hardware UART I would like to add an external...