In fact Hendrik, The settings.inc file is from an 18F25K22 that was modified. Virtually the same. I am going to try the USART2 port this afternoon and see if it works... I'll keep in touch...
In fact Hendrik, The settings.inc file is from an 18F25K22 that was modified. Virtually the same. I am going to try the USART2 port this afternoon and see if it works... I'll keep in touch...
Dave Purola,
N8NTA
EN82fn
Regarding using 2 serial ports, I have had great success running two ports at different speeds using the 18F26K22. Sample coding below.
Tim.
Code:INCLUDE "DT_INTS-18.bas" ; Base Interrupt System INCLUDE "ReEnterPBP-18.bas" ; Include if using PBP interrupts ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler RX1_INT, _SERIALIN1, PBP, no INT_Handler RX2_INT, _SERIALIN2, PBP, no INT_Handler TMR1_INT, _COUNTER, PBP, yes endm INT_CREATE ; Creates the interrupt processor ENDASM RCSTA1 = %11010000 ' Enable 9bit serial port & continuous receive TXSTA1 = %01100100 ' Enable transmit, BRGH = 1 BAUDCON1.3 = 1 ' Enable 16 bit baudrate generator SPBRGH1 = 0 SPBRG1 = B562500 ' 562500 Baud RCSTA2 = %10010000 ' Enable serial port & continuous receive & parity TXSTA2 = %00100100 ' Enable transmit, BRGH = 1 BAUDCON2.3 = 1 ' Enable 16 bit baudrate generator SPBRGH2 = 1 SPBRG2 = B38400 ' 38400 Baud @ 54MHZ
Timmers, I have NO problem using the two ports, in fact, that's why I chose the 18F26K22 for the application. I am running 3 ports, one is DEBUG. The application code is working just fine but it is Annoying to have to remove the part from the product each time to reprogram it when making development changes. I have always used the boot loader with MicroCode Studio, in fact thats why I purchased the product. I used to use the boot loader from Mel Labs but they also decided to stop supporting it a few years ago. Thats why I chose MicroCode Studio as my developement platform. Now that they are showing no interest in supporting the newer Pic's with there product (probably due to lower priority between Proton support, Amicus support and MicroCode studio support) I don't know what to do....
Dave Purola,
N8NTA
EN82fn
Dave,
This won't help but I always include a ICSP header on my boards so I can connect the PICKit3 and flash the chip if I don't have access to a bootloader.
I'm currently working on a board with a 46K22, I'll see if I can get that going with the DS30 loader but I'm currently having difficulties with the FT232RL USB<->UART bridge (first time using it in my own desing) and I need to get that going before continuing. I know you're using the 26K22 but perhaps it will help you - IF I get it going that is....
/Henrik.
Dave,
Glad you are (port) sorted.
I allways put an ICSP header in. If PortB.6 or b.7 are inputs you need to put a 1K-ish resistor in series and ICSP connections go directly to the PIC, that way you can overdrive the attached components.
For some older designs that do not have ICSP, I have a jig to insert between the socket and the PIC with the ICSP connections made to the jig.
I am also trying to implement a bootloader and was only aware of the Microchip one. Keep me posted should you have any success.
Tim.
Henrik, I have been working with David Barker the last 2 days with an open source Bootloader that comes with the new MCSPX 5.0 IDE. We got it working this morning and it performs is just like the old one. It allows you to build your own Bootload hex files for any of the new PIC's. I finally got that 18F26K22 running for the new LoadShed processor.
Dave Purola,
N8NTA
EN82fn
Hi Dave,
That's excellent news! A saw the UMC Firmware button in the new MCLoader and went on short search for information about what it was without much success. I found the UMC folder in the MCSPX install folder but there's very little information on how it works and how to configure it - especially for an ASM rookie like myself.
I thought more info would boil to the surface soon enough - and sure enough...
Anything you can, want and are allowed to share?
/Henrik.
Bookmarks