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.
i need to work on SPI on raspberry pi.
i have MCP3008.
i have enabled the SPI from "sudo raspi-config"
i have check with "lsmod"
i got the above after "lsmod"
when i run my code,
gives error, "Importerror: No module named spidev"
what to do NOW??
I am working on PIC18F4520.
I have a signal on PIN RB2 whose frequency is 120Hz, pulse width 230 us(approx.) and time between falling edge and next rising edge is about 200 ms.
I have to read this signal and check whether it has the above specifications or not.
how to do this..?????
yes they have libraries. BUT, I want to know the logic and steps to write my own routine for software I2C and UART. What if I have to work on some new IDE, or different microcontroller?? I will again have these doubts to ask..so better try to do this now..
- - - Updated - - -
I have written hardware UART code myself.., without using library functions. I don't know how to write it for software UART, software I2C.., I understand the concept for UART, but I don't understand how would you generate the output to send data ..?? would I need a timer which can generate the...
SSPCLKPPS = 0b01110; // RB6 input to SCL
SSPDATPPS = 0b01100; // RB4 input to SDA
RB6PPS = 0b10000; // SCL output to RB6
RB4PPS = 0b10001; // SDA output to RB4
i missed that note earlier, thanks for pointing out...
i have to write all the 4 lines ????
i got the point that these pins are...
thanks a tonn Susan., I just added
RB7PPS = 0b10100;
RXPPS = 0b01101;
I have one more doubt., data sheet says that you have to follow a sequence to lock/unlock peripheral select., sequence is given in assembly in data sheet(page 140).
I have not used that sequence, nor did I change...
sorry, I don't have that code now as I have made lots of changes in my code since then..,
now I am working on PIC16F1708.
it has remappable pins and functions as well., but I don't know how to use those functions., they are predefined in PIC library..i am working on MikroC for PIC, by...
I am trying to get the hardware UART working on PIC16F1618 @ 8MHz, 9600bps.
I have worked on hardware uart earlier with other PIC controllers. but I am not able to get this one working.
when I use the UART library routines, it gives the following error:
"Unresolved extern 'PPS_Mapping'...
it works with blank main() function.., I have tried that with PIC18F45K22.
so it should work with pic16f too..
well, I tried writing simple delay in main, it builds, but again gives the same error...
- - - Updated - - -
pic16f1618 is there in the device list..it connects successfully.
I am using PIC16f1618 with MikroC PRO for PIC. to load the HEX file into PIC, I am using PICKIT3 with MPLAB IPE ver.2.35.
when I load the HEX file, it gives the following error:
The line checksum on line 6 of the hex file is incorrect; the hex file appears to have been corrupted...