Go Down

Topic: serial pheripheral interafce (Read 1 time) previous topic - next topic

bhuvaneshnick

Code: [Select]
Atmel chips use the SPI interface in order to program the chip.

1)here atmel chip means microcontroller.what he is saying that microcontroller using spi interface to program microcontroller.what is he mean
2)does spi is communication between microcontroler and other peripheral device like(ldr,sensors)or its a communication between usb and microcontroller.help me to come out of this choas

strykeroz

Hi

Atmel microcontrollers can be programmed using SPI, and on the Arduino these pins are broken out to the ISP programming header for this purpose.  SPI is also, as you rightly point out, used for Arduino to control and interrogate other peripheral sensors etc.

When you program via USB, you're actually programming via the UART or hardware serial pins of the microcontroller.  On the ATMega328P that's pins 2 & 3.  This is made possible by the bootloader which is also what provides the serial monitor functionality via USB and those same pins.

Cheers!
Geoff
"There is no problem so bad you can't make it worse" - retired astronaut Chris Hadfield

bhuvaneshnick

thank you .now i understood well.i heard
Quote
"bootloader is to burn the codes to chip.without any hardware
.what the hardware sense.in pic controller are they using any hardware to burn.i am not clear with what that hardware means.thank you in advance

CrossRoads

This requires an AVR progrmmer, such as Atmel AVR ISP MKii,
http://www.mouser.com/ProductDetail/Atmel/ATAVRISP2/?qs=%2fha2pyFadujqFzV%252bExzQOlFEGuFbE5zkYm9OzGvRqkjeoy23MLFzjw%3d%3d
or https://www.sparkfun.com/products/9825
to take over control of the chip. They connect to the SCK, MISO, MOSI, (a.k.a.SPI pins) and Reset, Power, Gnd. They pull the Reset pin low, and use the SPI pins to program the fuses and the memory directly.  Within the IDE, this is done with the Tools:Burn Bootloader feature.
If you do not want a bootloader, so that you sketch starts immediately after a Reset, the same programmer is used and File:Upload Using Programmer is used to put your sketch into memory.

If a bootloader is installed, then after a Reset the bootloader will monitor the Serial port to see if a sketch is to be downloaded, and if not then the existing sketch in memory is started.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

bhuvaneshnick

thank you.now i got what it mean hardware. IDE is integrated device electronics this generally works with 40 pin ribbon cable which is used ATA hardisk to master slave communication in harwares.but most are become now as sata(serialATA).why your using this term(IDE) here.

graynomad

Quote
IDE is integrated device electronics

Wrong IDE, in this context it means Integrated Development Environment. IE the application you use to write your program and download it to the Arduino.

http://en.wikipedia.org/wiki/Integrated_development_environment

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Go Up