hi i'm new to PICs and
I want to learn how to Program a PIC
and For the first step i would like to build a PIC Programmer
i have search Google and Yahoo For schematics of PIC Programmer
Nigel Goodwins page is a good place to start . I started with a velleman kit 8048. it comes with program examples
MPASM and Progpic, and of course schematic diagram.
The Junebug and PICkit2 have software written and maintained by Microchip. That is a huge advantage.
Both can be used to debug PIC chips with hardware breakpoints. All but the very small PICs do.
Both can be used as simple 4 channel logical analyzer.
Both can be used as simple tool to route TTL level to view ASCII from the PIC or other device.
I have not tried it but Bill tells us the Junebug will function as serial analyzer (supporting I2C™, SMBus, SPI and USART protocols) if you are willing to swap out the PIC18F2550 with another 18F2550 can program using the junebug. You can not do the with the PICkit2.
It functions the same as this analyzer.
**broken link removed**
Hi 3V0, yes because the Junebug has the I2C connections on the top header it can be reflashed to work as a Serial Analyzer. I've been using the I2C master mode to test I2C devices and it works great. The genuine SA also reports on bus level (a feature not supported by a Junebug or PK2)
Here's someone who's modded their PK2 for use as a SA. **broken link removed**
I find I2C is trickier than SPI so I welcome the SA.
Here's something I wrote to test the I2C on a PICDEM Explorer HPC Board I had laying around. **broken link removed**
This simple program worked first time. It reads from the onboard TC74 I2C temperature sensor and displays the result on the 8 LEDs on PORTD every 200ms.
Code:
Device = 18F8722
Clock = 4
Include "I2C.BAS"
Const TC74 = $9A // default TC74 V5 address
Dim Value As Byte,
Address As Word
OSCCON = $62 // 4MHz internal OSC
TRISD = $00
I2C.Initialize
// read the data back...
While (1=1)
I2C.Start
I2C.WriteByte(TC74)
I2C.WriteByte($00)
I2C.Restart
I2C.WriteByte(TC74 + 1) // change to I2C read
Value = I2C.ReadByte
I2C.Acknowledge(I2C_NOT_ACKNOWLEDGE)
I2C.Stop
PORTD = Value
DelayMS(200)
Wend
End