Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Search found 55 matches
www.mcselec.com Forum Index
Author Message
  Topic: Programatically read ports
syndetic1

Replies: 1
Views: 54

PostForum: BASCOM-AVR   Posted: Fri Dec 03, 2021 5:30 am   Subject: Programatically read ports
Dim A as Byte
A = PORTB

gets port B into variable A

Is there a way that "B" can be a variable

eg something like A=PORT(VAR)

(BASCOM-AVR version : 2.0.8.4 )
  Topic: XMEGA EEPROM Gotcha
syndetic1

Replies: 1
Views: 42

PostForum: BASCOM-AVR   Posted: Fri Dec 03, 2021 2:41 am   Subject: XMEGA EEPROM Gotcha
I think I found a gotcha using EEPROM

The CONFIG EEPROM statement sets the Mode of Operation to either Quick or Mapped
if that config statement is not present at all then I can't store and retriev ...
  Topic: XMEGA I2C
syndetic1

Replies: 2
Views: 53

PostForum: BASCOM-AVR   Posted: Thu Dec 02, 2021 11:23 pm   Subject: XMEGA I2C
Hi guys,

I am stuck getting the I2C to work on a XMEGA128A1

I cant get it to work with either Hardware or Software I2C (Code below).

It's gets stuck on the I2C start. So whatever I am doing ...
  Topic: XMEGA ADCB reading Weird
syndetic1

Replies: 2
Views: 84

PostForum: BASCOM-AVR   Posted: Mon Nov 29, 2021 9:47 pm   Subject: Yes Fixed!
laborratte - Thank you!
You said "Did you check JTAG Fuse?"
So I go look at the data sheet and indeed the high 4 bits of Port B have JTAG as alternate functions.
The Bascom help shows a statement ...
  Topic: XMEGA ADCB reading Weird
syndetic1

Replies: 2
Views: 84

PostForum: BASCOM-AVR   Posted: Mon Nov 29, 2021 9:25 am   Subject: XMEGA ADCB reading Weird
Hi guys, I am having trouble with the ADC on the XMEGA128A1
The problem is with ADCB

I have a very simple program that reads all 16 ADC inputs and writes them to a terminal.
I have copied the r ...
  Topic: XMEGA ADC Selecting Channels
syndetic1

Replies: 5
Views: 114

PostForum: BASCOM-AVR   Posted: Mon Nov 29, 2021 3:24 am   Subject: Others have ADC issues
This bloke has a very interesting blog
https://blog.frankvh.com/2010/01/03/atmel-xmega-adc-problems-solutions/
  Topic: XMEGA ADC Selecting Channels
syndetic1

Replies: 5
Views: 114

PostForum: BASCOM-AVR   Posted: Sun Nov 28, 2021 1:31 am   Subject: XMEGA ADC Selecting Channels
Hi guys,

I am having trouble understanding the MUX selection on the XMEGA.

Here is what I know. At the end is a question on how to measure the internal ground voltage.
Chip is ATXMEGA128A3U-AU ...
  Topic: var=PINx dynamic
syndetic1

Replies: 6
Views: 419

PostForum: BASCOM-AVR   Posted: Wed Mar 03, 2021 12:10 am   Subject: var=PINx dynamic
To read a port one writes a statement like

MYByte = PINA
or
MYByte = PinC.3

Is it possible to have the C and the 3 be variables?

like MYByte = Readpin Port_Number . bitnumber
Where Port_ ...
  Topic: Simulating XMEGA ADC
syndetic1

Replies: 4
Views: 325

PostForum: BASCOM-AVR   Posted: Sun Feb 28, 2021 9:01 pm   Subject: Solved - Thank you
Thanks Mark for clarifying
  Topic: Simulating XMEGA ADC
syndetic1

Replies: 4
Views: 325

PostForum: BASCOM-AVR   Posted: Sat Feb 27, 2021 6:04 pm   Subject: Simulating XMEGA ADC
The simulator only allows you to set values for inputs 0-7.
I set all of the 8 simulator settings to non zero values.

I think Getadc(adca , 0 , Mux) where Mux = 0 should give me analogue input 0 ...
  Topic: Simulating XMEGA ADC
syndetic1

Replies: 4
Views: 325

PostForum: BASCOM-AVR   Posted: Sat Feb 27, 2021 4:06 am   Subject: Simulating XMEGA ADC
The essence of this question is:
Does the simulator work with the XMEGA ADC?

Below is the code from
"C:\MCS\BASCAVR2083\Samples\XMEGA\ADC\xm128-ADC.bas"
In the listing below I only added $sim
...
  Topic: Compile problem - Incorrect Number Of Paremeters
syndetic1

Replies: 3
Views: 279

PostForum: BASCOM-AVR   Posted: Thu Feb 25, 2021 11:08 pm   Subject: Solved - Thank you
Thanks guys - greatly appreciated.
  Topic: Compile problem - Incorrect Number Of Paremeters
syndetic1

Replies: 3
Views: 279

PostForum: BASCOM-AVR   Posted: Thu Feb 25, 2021 12:09 am   Subject: Compile problem - Incorrect Number Of Paremeters
When I try to compile the code below I get this error
Error : 130 Line : 19 Incorrect number of parameters. The number of parameters must be
$regfile = "m128def.dat"
$sim ...
  Topic: BASCOM Sample code
syndetic1

Replies: 4
Views: 833

PostForum: BASCOM-AVR   Posted: Mon Apr 09, 2018 6:04 am   Subject: BASCOM Sample code
Found it - Thank you. Greatly appreciated.
  Topic: BASCOM Sample code
syndetic1

Replies: 4
Views: 833

PostForum: BASCOM-AVR   Posted: Mon Apr 09, 2018 2:08 am   Subject: BASCOM Sample code
Hi,

I thought bascom installed a directory
C:\Program Files (x86)\MCS Electronics\BASCOM-AVR\SAMPLES

The current version 2.0.8.1 does not have this. Maybe I am mistaken.
My recollection wa ...
 
Page 1 of 4 Goto page 1, 2, 3, 4  Next
All times are GMT + 1 Hour
Jump to: