I've learned lots from this forum - thanks everyone. But now I have a specific problem I cant find an answer to...
I've been coding away happily on a 16F1937, but have hit the array size limit for my program.
I bought an 18F45K80 but cant get it to work. I went right back to a hello world blinking LED with blink.pbp from the examples folder - got it working in a circuit with the 16F and then recompiled etc targeting the 18F and put it in the known working circuit. No luck.
Is there something I need to include on the circuit to accommodate the new chip? Something in the code that needs to be changed?
Here is the code:I took a pictr of the breadboard layout, but I'm having trouble getting it onto the board - I'll update if I manage it.Code:' Name : BLINK.pbp ' Compiler : PICBASIC PRO Compiler 2.6 ' Assembler : PM or MPASM ' Target PIC : 16F or 18F types ' Hardware : Non specific ' Oscillator : internal or external ' Keywords : BLINK LED ' Description : PICBASIC PRO program to to blink an LED connected ' to PORTB.0 about once a second ' 'The following program is a simple test to blink an LED on and off. Select a 'device in the dropdown list above, then click the Compile Only button on the 'toolbar to compile the program and generate a hex file. ' Configure pins for digital operation (uncomment as needed). ' These settings are intended as simple examples. For more detail, ' see the appropriate device datasheet for register descriptions. 'ANSEL = 000000 ' 16F88, 16F688, 16F690, 16F88x 'ANSELH = 000000 ' 16F690, 16F88x 'ADCON1 = 000111 ' 16F87x, 16F87xA, 18F452 'ADCON1 = 001111 ' 18F4620 TRISB = 0 LED VAR PORTB.0 ' Assign name "LED" to PORTB.0 mainloop: High LED ' Turn on LED connected to PORTB.0 Pause 500 ' Delay for .5 seconds Low LED ' Turn off LED connected to PORTB.0 Pause 500 ' Delay for .5 seconds Goto mainloop ' Go back to loop and blink LED forever End





Bookmarks