Maybe it's better to use HSEROUT for sending data instead of HSERIN ;-)
What do you realy want to build ?
Maybe it's better to use HSEROUT for sending data instead of HSERIN ;-)
What do you realy want to build ?
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
I will send from PC (via SerialCom) a huge packet of data, beginning with $FF and ending with $FF.
The PIC should receive the packet and store it to the FRAM.
I tried it like above, but i receive max 96 Bytes and then waiting for another $FF. I just need to say to the PIC, when $FF is incoming, then read the data and store till another $FF instruction is following.
Have you looked at this http://www.picbasic.co.uk/forum/showthread.php?t=6982
Bruce posted it yesterday, can not wait to try it myself.
Dave
Always wear safety glasses while programming.
Hi Rob,
if you want your program to reiceve the 2k of characters and then store them to the FRAM, you would have to buffer them in the RAM.
Which PIC are you using currently?
Regards,
Ingo
If you want to receive 2k Data inside two start-stop-signs, you can't use one PBP-command, you have to write a programm !
like this:
Repeat
Read 1 character
Until this is the start-character
ende=0
repeat
Read 1 character
if "this is the end"? then
ende=1
else
store the character
endif
until ende=1
And don't forget to use the hardware-UART !
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
I have an USART MAX232. Itīs on my dev. board included.
I know how you mean to realize that, but i have to trigger the RX Channel with the incoming data from the computer? I use 9600Baud = 960 Bytes included start & stopbit.
I think without serin commands can it be difficult to catch the bytes for the right time, maybe the input will shift for many bits!
No !
The MAX232 isn't a USART. The USART is a part of the PIC. Just look, if the Rx- and Tx-Pins are propperly used.
No,
after activating the USART, it will receive any character.
Yes,
every second !
Without using HSERIN it will be impossible !
You have 1/960 seconds to store a character.
Writing to a EEPROM needs 10ms (10 times more) to complete the write-cycle.
You have to store the data in RAM.
If you are good - you can write 1 page (maybe 128 Bytes) to a serial eeprom and start the write-cycle and maybe 15 characters later you can start to submit the next page, so you must only buffer 15-30 characters.
Using hardware-USART with interrupts will be much better.
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
I prefer to use FRAMīs. Then there will no troubles about writing to eeprom.
Bookmarks