Author |
Message |
Topic: Software UART issues |
AdrianJ
Replies: 13
Views: 2757
|
Forum: BASCOM-AVR Posted: Wed Jul 01, 2020 1:30 am Subject: Software UART issues |
Building strings from an array is good, but be aware that the string MUST end with a null ( chr(0) ) Else when you try and use the string somewhere else, you will get what looks like corruption, and ... |
Topic: Output Files |
AdrianJ
Replies: 10
Views: 948
|
Forum: BASCOM-AVR Posted: Mon Jun 01, 2020 1:44 am Subject: Output Files |
None of those are really directly useful without the source code, and IMHO you can delete them, assuming of course you still have the source !
I would even include the hex, eep and bin files in a ... |
Topic: M1284P Odd Reset Issue |
AdrianJ
Replies: 20
Views: 1056
|
Forum: BASCOM-AVR Posted: Fri May 15, 2020 2:08 am Subject: M1284P Odd Reset Issue |
Good that you solved it !
I know its easy to be wise after the event, but a circuiit diagram of the actual board you had ( not one with a phantom AVcc connection ! ) would have made trouble shoot ... |
Topic: adding a null to a string |
AdrianJ
Replies: 5
Views: 648
|
Forum: BASCOM-AVR Posted: Tue Mar 03, 2020 2:28 am Subject: adding a null to a string |
For Aa = 1 To 4 'fill the string with 4 chars
Mid(mystring , Aa , 1) = "b"
Next Aa
Bytes(5) = 0
You can also do it without the overlay:
... |
Topic: Lcd update every second? |
AdrianJ
Replies: 6
Views: 790
|
Forum: BASCOM-AVR Posted: Mon Feb 24, 2020 11:33 pm Subject: Lcd update every second? |
That looks right. And yes, there will always be some jitter. As you make the main loop longer, it will get more. But unless there is some good programming reason, timing jitter on an LCD update sho ... |
Topic: Lcd update every second? |
AdrianJ
Replies: 6
Views: 790
|
Forum: BASCOM-AVR Posted: Sun Feb 23, 2020 11:40 pm Subject: Lcd update every second? |
Create another timer ISR which sets a flag every second.
In your main loop, read the flag, if its not set, continue the loop.
If it is set, clear the flag, then update the display.
main:
... |
Topic: Using a Timer for Soft clock instead of 32768 kHz xtal |
AdrianJ
Replies: 15
Views: 1207
|
Forum: BASCOM-AVR Posted: Thu Feb 20, 2020 3:40 am Subject: Using a Timer for Soft clock instead of 32768 kHz xtal |
A few other thoughts, reaching back into ancient history:
You might be able to use a lower base frequancy, like near 1Hz, rather than 0.1Hz, by setting the timer3 compare up near 62000 ( dont go ov ... |
Topic: Using a Timer for Soft clock instead of 32768 kHz xtal |
AdrianJ
Replies: 15
Views: 1207
|
Forum: BASCOM-AVR Posted: Thu Feb 20, 2020 12:06 am Subject: Using a Timer for Soft clock instead of 32768 kHz xtal |
The value of Compare3 can only be set in integer amounts. If its around 6000, then the smallest increment is about 1:6000, thats about 14 secs per day. So its not a very fine adjustment. Thats huge ... |
Topic: serialin |
AdrianJ
Replies: 2
Views: 589
|
Forum: BASCOM-AVR Posted: Fri Dec 06, 2019 12:26 am Subject: serialin |
I think most of the problem is with Atmel. If they had called the Uarts 1,2... etc then most of the problems would have been fixed. But of course they probably think in ASM, like me, where the base ... |
Topic: Hardware problem, maybe software solution ? |
AdrianJ
Replies: 8
Views: 527
|
Forum: BASCOM-AVR Posted: Wed Oct 30, 2019 11:11 pm Subject: Hardware problem, maybe software solution ? |
What you propose might help, but if the LCD ground and processor ground are not closely tied together - in the RF sense - , then noise spikes on one end will still cause problems on the other. I think ... |
Topic: Baudrate 9600 problem |
AdrianJ
Replies: 19
Views: 1997
|
Forum: BASCOM-AVR Posted: Wed Oct 23, 2019 11:03 pm Subject: Baudrate 9600 problem |
Thanks for the clarification Mark. I thought that waitkey might be waiting for the next character, after the one which set the ischarwaiting flag. In which case that one would be missed. |
Topic: Baudrate 9600 problem |
AdrianJ
Replies: 19
Views: 1997
|
Forum: BASCOM-AVR Posted: Tue Oct 22, 2019 11:21 pm Subject: Baudrate 9600 problem |
I would suspect that using ischarwaiting together with waitkey is the problem, at the least, one of them is redundant.
You do bufferend input, so IsCharWaiting tells you at least one character is i ... |
Topic: Why does the IDE display an open file like this? |
AdrianJ
Replies: 7
Views: 594
|
Forum: BASCOM-AVR Posted: Sun Oct 13, 2019 11:47 pm Subject: Why does the IDE display an open file like this? |
I had similar problems with the IDE formatting a while ago. Changing to Consolas font, as recommended by Mark, seems to have fixed it. Dont know if that problem still exists. |
Topic: Problem Understanding CONFIG SUBMODE = NEW |
AdrianJ
Replies: 7
Views: 805
|
Forum: BASCOM-AVR Posted: Sat Oct 05, 2019 12:28 am Subject: Problem Understanding CONFIG SUBMODE = NEW |
@njepsen
Maybe just to clarify a bit further:
If you dont use $includes at all, then its up to you to ensure your declarations, main code and subs are in the right places. You seem to do this alr ... |
Topic: Bootloader |
AdrianJ
Replies: 46
Views: 6062
|
Forum: BASCOM-AVR Posted: Wed Sep 25, 2019 11:50 pm Subject: Bootloader |
Ok, another way to achieve the target of being able to load both main and bootloader together is to use AVR Studio. That has the facility to load several hex files, eg bootloader, and main, into one ... |
|