I have not used that part but a quick look at the data sheet says you should be able to use the SHIFTIN command in Pic Basic Pro.
You posted in PIC BASIC. Is that what you are using or are you using the Pro version?
The 690 also has a built in ADC.
I have not used that part but a quick look at the data sheet says you should be able to use the SHIFTIN command in Pic Basic Pro.
You posted in PIC BASIC. Is that what you are using or are you using the Pro version?
The 690 also has a built in ADC.
Dave
Always wear safety glasses while programming.
This is an example for EEPROMS
http://melabs.com/resources/samples/x1/pbp/spix.htm
You should be able to modify it for the ADC
Dave
Always wear safety glasses while programming.
why the command set changes even all the codes are in basic language.In the article they are using shiftin and shift out but my compiler uses shiftright and shiftleft,why such a difference is needed.why am asking this is because they are using "sck" and i dont know what for they are using.as i mentioned above am new to this world(MPU), so i dont think you will laugh at me.
IF YOU BORN POOR ITS NOT BECAUSE OF YOU BUT IF YOU DIE POOR ITS BECAUSE OF YOU.
Most of us here use this to compile
http://store.melabs.com/prod/pbp.html
I am not familiar with oshonsoft compiler. I did not notice that you were using that earlier.
Basically you will have three pins on something like this.
DATA
CLOCK (SCK)
LATCH or Chip Select
Dave
Always wear safety glasses while programming.
i now understood the use of "sck" that it is used to control the serial clk (pin) of the adc,but in the oshonsoft i cant find any command to do that.it simply got spicson and spicsoff to control the "cs" pin of the adc and no more to control the spi clk.please give me a good idea to do my project.As i mentioned above
my project is to communicate the LTC2400 to a pic 16f690 and to display on a 16*2 lcd.The lcd portion working good.THANKS FOR NOW AND THANKS A LOT FOR YOUR FURTHER SUGGESTIONS.
IF YOU BORN POOR ITS NOT BECAUSE OF YOU BUT IF YOU DIE POOR ITS BECAUSE OF YOU.
I would give the PBP demo a try if I were you
http://melabs.com/pbpdemo.htm
Dave
Always wear safety glasses while programming.
Because you are using the Oshonsoft compiler and "we" at this forum are using the MELABS PicBasicPro compiler (or PicBasicCompiler) - not the Oshonsoft BASIC compiler.
You need to "translate" the any examples not written for your compiler so the instructions matches your compilers instruction set. BASIC is not known for being the most standardised programming language. Most i spretty similar in the basic command set like GOTO, GOSUB, FOR-NEXT, WHILE_WEND etc but when it comes to all the "special commands" like SPI, PWM, LCD, etc etc each compiler has it's own way of handling it. There simply is no standard for those type of commands.
A quick look at the Oshonsoft site seems to indicate that what you are looking for is the [url=http://www.oshonsoft.com/picbasiccompilerreferencemanual.html#677] SPI Communication commands. Not ShiftLeft and ShiftRight - they are for shifting bits around in memory, not for shifting them in or out a pin.
Don't worry about beeing new to this, we've all been there at one time or another. However, you may get better help with your project by posting on the forum dedicated for the compiler you are using. Good luck!
/Henrik.
Hai brother,
for now i understood the differences among the instruction set on various compiler because of your reply and thanks for that.i want you to suggest me a compiler which will be better for future developments,because i think am still a wet clay and can be shaped.currently my project is communicating a pic16f690 to a external adc(LTC2400),I hope you will support me.THANKS A LOT FOR YOUR FURTHER SUGGESTIONS.
IF YOU BORN POOR ITS NOT BECAUSE OF YOU BUT IF YOU DIE POOR ITS BECAUSE OF YOU.
Bookmarks