Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
mikrobasic interrupts 16f88
First of all, the osc of the PIC and the osc of timer1 is totally different, you cannot use the timer1 osc to run the PIC.
If I understand the datasheet right, this PIC will run on 31kHz internal osc with your settings.
I'd recommend to sort out how to use the...
long distance spi
I agree with the other posts, do not use SPI in a noisy enviroment, use a differential bus like CAN or rs-422/485.
The microchip SPI CAN controller is the MCP2515, the CAN transceiver is the MCP2551.
spi maximum distance
The distance will depend on the bus speed. 70cm is OK, question is, how fast do you want to go?
I've connected an SPI accelerometer with a ~1/2m cable, I was able to use 1.5MHz clock speed.
I use a diode for this purpose (and a resistor in series). Anode towards Vdd, cathode to MCLR. During normal operation the diode is open, providing Vdd to MCLR. When programming MCLR get the ~13v but the diode is closed.
Re: Regarding MMC card
I recommend checking this page for info on MMC.
There are also working examples, even routines for FAT handling, check the resource part of this page.
interrupt latency pic 18f
That text applies to external interrupts only, where you don't know exactly when the interrupt hits, so cannot compensate the for the exact number of cycles (the variation in the number of cycles is because it depends on during which internal cycle the interrupt...
I don't know how the ports are called in CCS, but something like this should work.
while(RC4);
This waits until the pin becomes low, so a falling edge. Use "!RC4" for the other direction.
Probably the easiest is to use a pin with an interrupt capability on change (RB0/INT or RB4-7). In the interrupt routine simply increment your counter.
Re: CAN Protocol
Is the at89s51 really necessary? There are ucs with built-in can modules (like at90canxx from atmel or there are lot of pics from microchip like the 18f4480), so you have one problem less.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.