Shop OBEX P1 Docs P2 Docs Learn Events
sxb compiler, uart routines — Parallax Forums

sxb compiler, uart routines

thomasschubertthomasschubert Posts: 15
edited 2012-09-17 13:10 in General Discussion
Hi

I usally write code in assembler for the SX chip set but are trying out the compiler.
Im using the SXKEY USB to debug and program but just cant seem to get the SERIN to work. Im running at 50MHZ, yet in some documentation it states I cant run higher than 12MHZ.
My signal is inverted, so using the N option.
Is there any way I can tell if the SX key is running at 50MHZ, if I look at the Clock option it states a differant frequancy. I do have the FREQ option in the code.
Also I need to use at least 80 bytes for the receive buffer, is there an easy way to store to multiple banks. When writing in ASM I used the FSR opcode to change banks can the SERIN do simular.

thanks

Comments

  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2012-09-17 13:10
    Are you using a 50Mhz resonator or a crystal clock source for your project? How do you have the clock defined in your code? I'm not sure how the new USB SX-Key will handle debugging at 50Mhz. Do you really need to run the chip at 50Mhz? Unless you have a really high speed serial link you may be able to use 20Mhz instead.

    What baud rate are you trying to use and can you echo out the data on the link to make sure it is sending what you expect?

    Instead of using SERIN you may want to search the forums for the ISR based Serial code written by JonnyMac. It has a 16 byte buffer. That code is written in assembly so I suppose you could rework that to try and buffer more characters. Are you running the SX28 or SX48? The SX48 will have more memory to work with.

    Robert
Sign In or Register to comment.