Oscillator speed?
Or is that not required any more with v3.0 (I'm still on v2.60).
Robert
Oscillator speed?
Or is that not required any more with v3.0 (I'm still on v2.60).
Robert
I am using the internal oscillator which defaults to 8MHz
I also tried the program with
DEFINE OSC 8
preceeding the LCD definition statements, all to no avail
I was even more disappointed that my Blinky LED program didn't work
I have +5V connecteds to pins 7 and 20 (AVdd and Vdd) and 0V connected to pins 8 and 19 (AVss and Vss). I have a 10k pull-up resistor from MCLR (Pin 1) to +5V and 330R in series with LED connected from RA0 (Pin 2) to 0V. I even tried fliping the LED just in case I put it in backwards!Code:TRISA = 0 ' Set PORTA as output LED VAR PORTA.0 ' Assign name "LED" to PORTA.0 mainloop: High LED ' Turn on LED connected to PORTA.0 Pause 500 ' Delay for .5 seconds Low LED ' Turn off LED connected to PORTA.0 Pause 500 ' Delay for .5 seconds Goto mainloop ' Go back to loop and blink LED forever End
Any ideas on why this thing won't work as expected?
Perhaps the default for RA0/AN0 is an analog input pin? I thought the TRISA = 0 statement would overide...
Cheers
Barry
VK2XBP
How are the configs setup?
Dave
Always wear safety glasses while programming.
I always stay away from analog pins until I get a basic program running.
Robert
Thanks Robert - Unfortunatley this device has so many options per pin. If I stay away from the analog pins then I run into PWM pins, motion feedback pins and others that I haven't got my head around yet. I thought the RA0/AN0 option was the path of leas resistance.
Dave, I am using my MeProgrammer to configure the device at time of programming.
Details are as follows:
Oscillator = INTRC
Inernal External Switch Over = Enabled
Fail-Safe Clock Monitor - Enabled
Power-Up Timer = Disabled
Brown-Out Reset = Enabled
Brown-Out Reset Voltage = 2.0V
Watchdog Timer = Enabled
Watchdog Timer Postscaler = 1:512
Watchdog Timer Window = Enabled
PWM Pins = Disabled on Reset
Low-Side Transistor Polarity = Active High
High-Side Transistor Polarity = Active High
Special Event Reset = Disabled
MCLR Pin Function = Reset
Stack Overflow/Underflow Reset = Enabled
Low Voltage Programming = Disabled
All other memory options are "Not Protected"
Cheers
Barry
VK2XBP
Update:
I have added the following lines to my Blinky LED program:
I was confident I would see a blinking LED after these changes but was sadly mistaken...Code:ANSEL0 = 0 ' Set all PORTA as digital I/O ADCON0.0 = 0 ' Disable A/D module TRISA = 0 ' Set PORTA as output
Cheers
Barry
VK2XBP
Some will disagree, but I have never trusted the programmer to set the configs.
What version of PBP are you running?
Dave
Always wear safety glasses while programming.
Bookmarks