Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Dra

  • Rank
  1. Porting Tcp/ip To Boostc

    Good day Tom and Jorge. The guys at matrix helped me get the serial going. Now the program gets stock in the following loop. What should be taking place and how can I go about troubleshooting it? while (network_in_configmode()){ //wait until we have an IP from the DHCP server (you should add some code to skip this when it fails) clear_wdt(); network_handle_tasks(); }
  2. Porting Tcp/ip To Boostc

    So this interrupt() fires for all interrupts, and it is the code in the function which checks which interrupt was fired? Could you give some details on the below function. In this case, when does it take place and what does nop() do. Looking through the source boost data sheet I'm still not clear on this: Thanks in advance. void interrupt_low(){ nop(); }
  3. Porting Tcp/ip To Boostc

    Hi Tom. Looking through the code I don't see where the interrupt() function is being called. How does this work?
  4. Porting Tcp/ip To Boostc

    Hi Tom. Just discovered the void interrupt(){} is not the code. From the beginning, getting the code to compile in the flow-code environment was a challenge. At some point the interrupt routine must have gotten chopped. It might have been over the issue that when I try to compile with the routine, flowcode returns and error, "void interrupt(){} already has a body". It seem the FC IDE automatically generates an empty interrupt(){}. I have to take this up with the guy a matrixmultimedia. Keep you posted. Thanks for your help.
  5. Porting Tcp/ip To Boostc

    I let this out. During one of the test I shortened the string but forgot to change the length argument it was still set to 44. Notice that after \r\n the serial continued to print. I would have expected such but what it printed I didn't. Have a look. Once the data is sent my thinking is that the buffer[location] should be cleared(that location in the buffer should have no value/is empty). Below is what printed from this call, "serial_send_data("SPI & SRAM INIT OK, memory test\r\n",44); " SPI & SRAM INIT OK, memory test ory why the "ory" after \r\n?
  6. Porting Tcp/ip To Boostc

    Thanks. I tried the above and explicitly setting the registers to serial 1 i.e txreg ->txreg1, txsta ->txsta1 etc... I tried using a shorter string and still the same. Looking at the serial_init() and serial_send_data() is there anything that comes to mind, anything I can try that I have missed? void serial_init(){ //pie1.RCIE=1; //enable interrupts trisc.6=1; //enable the outputs/inputs trisc.7=1; txsta1.BRGH=1; baudcon1.BRG16=1; //spbrgh1=1249/256; //16bit brg @ 9600 baud spbrgh1=1040/256; //spbrg1=1249%256; spbrg1= 1040%256; txsta1.SYNC=0; rcsta1.SPEN=1; txsta1.TXEN=1; //transmit enable rcsta1.CREN=1; //receive enable ipr1.RCIP=1; //high interrupt priority } //sends an array of chars to the serial port void serial_send_data(unsigned char * data, unsigned char len){ for (int i=0;i<len;i++){ while (txsta1.TRMT==0); txreg1 = data; } }
  7. Porting Tcp/ip To Boostc

    In flow-code from time to time I would get an issue with the UART not working. I it was brought to my attention that clearing the buffer by doing 3 reads of the UART would clear the issue. And It did. I wonder if that could be an issue here. sp.h has functions to send data. Got any functions to receive data. I have used getc and gets do they work in SourceBoost?
  8. Porting Tcp/ip To Boostc

    Hi Tom what are the functions for receiving values over serial port? Do use a getc, gets and what are the arguments.? Do you use streams, and how do you identify/setup the streams?
  9. Porting Tcp/ip To Boostc

    Yes it does the same.
  10. Porting Tcp/ip To Boostc

    Thank Tom. As you suggested I tried placing a long string at the beginning of my code, and the same thing happened, the print out just stopped in middle of the text at about the same number of characters as before. And at that point the program stops. I place an LED to turn off after the print function and nothing happens.
  11. Porting Tcp/ip To Boostc

    Thanks Tom. I device got pass the spi_init(); sram_init(); The device now lock up on the following: serial_send_string("SPI & SRAM INIT OK, Performing memory test\r\n"); it prints out: - SPI & SRAM INIT OK, Performing memory The word "test" does not print. It does this consistently. I made changes to the serial_int() to work with my system does this look right? void serial_init(){ //pie1.RCIE=1; //enable interrupts trisc.6=1; //enable the outputs/inputs trisc.7=1; txsta.BRGH=1; baudcon.BRG16=1; //spbrgh1=1249/256; //16bit brg @ 9600 baud spbrgh1=1040/256; //spbrg1=1249%256; spbrg1= 1040%256; txsta.SYNC=0; rcsta.SPEN=1; txsta.TXEN=1; //transmit enable rcsta.CREN=1; //receive enable //ipr1.RCIP=1; //high interrupt priority }
  12. Porting Tcp/ip To Boostc

    Hi Tom. I got the code to compile. I made the changes in the config file. Troubleshooting through the code. I'm having issues with the SRAM. My setup. can you provide the change needed to run my hardware. Thanks in advance. 18f6722 10mhz set to 4x-PLL the ENJ28J60 is connected to the Hardware spi1 ENJ28J60 chip select connected to RD1 23K256 SRAM chip select connected to RD4
  13. Porting Tcp/ip To Boostc

    Thanks Tom looking at rtc.c, I can see that timer 3 is being used to generate the clock. My chip 18f6722 does have a timer 3. " it look like the issue has something to do with the following define: - "define RTC_INIT_TIMER pie2.TMR3IE=1; t3con.T3CKPS1=1; t3con.T3CKPS0=1; t3con.TMR3CS1=0; t3con.TMR3CS0=0; //code used to init the timer so it can run when RTC_ENABLE_TIMER is set to 1" In particular the "TMR3CS1" of "t3con.TMR3CS1=0" what does it do? And with that since the other timer values don't generate a compiler error can I assume they will work correctly with my chip?
  14. Porting Tcp/ip To Boostc

    From the guys at flowcode. Could you add any further insite to this? Thanks in advance. spi.c(13:2): error: unknown identifier 'rpinr21' The 18F6722 does not have remappable peripherals, they are fixed in place, so you can safely comment out all of these lines of code. rtc.c(20:67): error: unknown identifier 'TMR3CS1' The 18F6722 also does not have a RTCC peripheral so is there any way to remove these functions from the program. Does the program need RTCC functionality? IPtest.c(410:2): error: unknown identifier 'ancon0' The final set of errors seem to relate to the ADC and Comparator peripherals. Again are these actually required, Could you replace these with say a Flowcode ADC component which will automatically switch in the correct code for your device?